You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using react 16 portals, we are rendering part of our component tree into an iframe. We ran into the issue where the Media components in that part of the tree are referencing the parent window when we want it to reference the iframe.
Would you accept a PR to allow specifying the window object to be used (as an optional prop) for the matchMedia call, in our case sometimes an iframe's contentWindow?
The text was updated successfully, but these errors were encountered:
Can we make it automatic? For example, auto-detect if we are in an iframe and use that? I can't think of any situation where you'd render a <Media> in an iframe and want the media query registered on its parent window.
using react 16 portals, we are rendering part of our component tree into an iframe. We ran into the issue where the
Media
components in that part of the tree are referencing the parent window when we want it to reference the iframe.Would you accept a PR to allow specifying the window object to be used (as an optional prop) for the
matchMedia
call, in our case sometimes an iframe'scontentWindow
?The text was updated successfully, but these errors were encountered: