-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Define DocumentOrShadowRoot.activeElement #4837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed some editorial tweaks, but I'd like your help fixing up the domintro for web developers.
FWIW, we've had this implemented in WebKit for a while: |
Thanks, updated the first post! |
We have had this implemented in Gecko: https://searchfox.org/mozilla-central/rev/30b01f4f60dbcbd6b01500a26b3100c28005cf62/dom/webidl/DocumentOrShadowRoot.webidl#28. |
I guess |
Hm... now that I'm going through some of the tests @rakina wrote, I see that |
Oh I guess I should have waited for this PR to be merged before merging the WPT PR. But it looks like the remaining issues is really an editorial one so we should just fix that up & merge the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some algorithm tweaks needed. Also, I am curious about the fullscreen connection, e.g. maybe we could use retargeting but then return null if not in the same tree, like fullscreen does.
Oh hey you're right, we can actually just retarget and check if the result's root is the DocumentOrShadowRoot! Thank you :D |
Another part of #2013 and whatwg/dom#768. Moves
Document.activeElement
toDocumentOrShadowRoot.activeElement
/dom.html ( diff )
/index.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )