-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16.5 with better support of iframe has some side effects #13648
Labels
Comments
Probably a mistake. Send a PR please? |
JSteunou
added a commit
to JSteunou/react
that referenced
this issue
Sep 14, 2018
Should fix facebook#13648 by being as protective in `setOffsets` than in `getOffsets`
JSteunou
added a commit
to JSteunou/react
that referenced
this issue
Sep 14, 2018
Should fix facebook#13648 by being as protective in `setOffsets` than in `getOffsets`
This was referenced Sep 14, 2018
Yep, done |
JSteunou
pushed a commit
to JSteunou/react
that referenced
this issue
Sep 14, 2018
Should fix facebook#13648 by fallback on `window` when `document.defaultView` does not exists anymore
gaearon
pushed a commit
that referenced
this issue
Sep 14, 2018
Should fix #13648 by fallback on `window` when `document.defaultView` does not exists anymore
Simek
pushed a commit
to Simek/react
that referenced
this issue
Oct 25, 2018
Should fix facebook#13648 by fallback on `window` when `document.defaultView` does not exists anymore
jetoneza
pushed a commit
to jetoneza/react
that referenced
this issue
Jan 23, 2019
Should fix facebook#13648 by fallback on `window` when `document.defaultView` does not exists anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When transitioning from a state having an iframe inside a component to a state without that said iframe, we have an error at
setOffsets(node, offsets)
becausenode.ownerDocument.defaultView
beingnull
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
Working on it
What is the expected behavior?
Should not break
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Affected since this 16.5.0, coming from this PR exactly https://github.com/facebook/react/pull/12037/files#diff-26d90cba6ee597ef475fa80dcf76ae1d
getOffsets
as a check onownerDocument.default
fallbacks towindow
, butsetOffsets
does not.Is there a reason why?
The text was updated successfully, but these errors were encountered: