<p dir="auto">I used material-ui@next as server side render and do all things as the documents. But my console says</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Failed child context type: Invalid child context `64a55d578f856d258dc345b094a2a2b3` of type `Jss` supplied to `JssProvider`, expected instance of `Jss`.
    in JssProvider (at server.js:274)"><pre class="notranslate"><code class="notranslate">Warning: Failed child context type: Invalid child context `64a55d578f856d258dc345b094a2a2b3` of type `Jss` supplied to `JssProvider`, expected instance of `Jss`.
    in JssProvider (at server.js:274)
</code></pre></div>
<p dir="auto">Here are the code around line 274</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    const jss = create(preset());
    jss.options.createGenerateClassName = createGenerateClassName;

    const rootComponent = (
      &lt;JssProvider registry={sheetsRegistry} jss={jss}&gt;
        &lt;MuiThemeProvider theme={theme} sheetsManager={new Map()}&gt;
          &lt;App context={context} store={store}&gt;
            {route.component}
          &lt;/App&gt;
        &lt;/MuiThemeProvider&gt;
      &lt;/JssProvider&gt;
    );"><pre class="notranslate"><code class="notranslate">    const jss = create(preset());
    jss.options.createGenerateClassName = createGenerateClassName;

    const rootComponent = (
      &lt;JssProvider registry={sheetsRegistry} jss={jss}&gt;
        &lt;MuiThemeProvider theme={theme} sheetsManager={new Map()}&gt;
          &lt;App context={context} store={store}&gt;
            {route.component}
          &lt;/App&gt;
        &lt;/MuiThemeProvider&gt;
      &lt;/JssProvider&gt;
    );
</code></pre></div>
<p dir="auto">Is there some things wrong? Thanks for help.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The Popover doesn't overflow the <code class="notranslate">anchorEl</code> parent window when being positioned.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><code class="notranslate">Popover.getPositioningStyle</code> contains logic to position the popover relative to the <code class="notranslate">anchorEl</code> prop. It currently uses the global <code class="notranslate">window</code> object to get the <code class="notranslate">innerHeight</code> and <code class="notranslate">innerWidth</code> when calculating if the Popover is overflowing the window:<br>
<a href="https://github.com/mui-org/material-ui/blob/c3afd7bb33fa26e465dc333449e9449a4bb9e7bd/src/Popover/Popover.js#L123-L125">https://github.com/mui-org/material-ui/blob/c3afd7bb33fa26e465dc333449e9449a4bb9e7bd/src/Popover/Popover.js#L123-L125</a></p>
<p dir="auto">The problem above is that it is referencing the global window object when performing its position calculations, instead of the parent window of the <code class="notranslate">anchorEl</code> prop. A quick fix for this could be to use <code class="notranslate">Node.ownerDocument.defaultView</code> if an <code class="notranslate">anchorEl</code> was provided, which returns the <code class="notranslate">Window</code> object.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">See <a href="https://codesandbox.io/s/6lqo45vzvk" rel="nofollow">https://codesandbox.io/s/6lqo45vzvk</a>. You can see that the menu is positioned correctly within the main window relative to the button, however in the popout window the menu overflows the parent window.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">After testing the rewrite of the Portal component following my previous issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="275033282" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9207" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/9207/hovercard" href="https://github.com/mui/material-ui/issues/9207">#9207</a>, I noticed the Popover positioning issue within the second window.</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.30</td>
</tr>
<tr>
<td>React</td>
<td>16</td>
</tr>
<tr>
<td>browser</td>
<td>all</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>