-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use ownerDocument
instead of document
#1158
Conversation
This pull request is being automatically deployed with Vercel (learn more). headlessui-vue – ./packages/playground-vue🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/CVz2hJonmTTk2eJdEcjs7mHBwaNE headlessui-react – ./packages/playground-react🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/DGLT8fGEBmLm2XWHUvEtgYPTY4Rz |
de9f53f
to
88564da
Compare
88564da
to
0f6c5ac
Compare
0f6c5ac
to
3fa6a31
Compare
3fa6a31
to
296a591
Compare
296a591
to
d694a5d
Compare
d694a5d
to
c716aa5
Compare
c716aa5
to
8fa9e7a
Compare
8fa9e7a
to
49009ec
Compare
49009ec
to
344ff7a
Compare
344ff7a
to
08ac83f
Compare
08ac83f
to
ac4f6e6
Compare
ac4f6e6
to
af74e42
Compare
af74e42
to
8b1b5fe
Compare
8b1b5fe
to
21dd499
Compare
This should ensure that in iframes and new windows the correct document is being used.
21dd499
to
881230c
Compare
We are currently relying on
window
anddocument
, but those are not always the correct instances. When you are in an iframe or opened a new window, there is a different owner. You can get this owner by usingnode.ownerDocument
In this PR we will use the correct
ownerDocument
. In addition, we will also use the correctwindow
which can be found viael.ownerDocument.defaultView
Fixes: #966