This repository was archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 491
Fix activeElement
for ShadowRoot: focused elements in light DOM of host are now returned.
#463
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This doesn't handle the case that the active element is within the shadow DOM of an element in the ShadowRoot's host's light DOM. |
2d84a63
to
3fa48d2
Compare
Ok, fixed for that case. |
@azakus ping |
@@ -80,8 +80,13 @@ | |||
|
|||
var activeElement = wrap(unwrappedActiveElement); | |||
|
|||
// Loop while activeElement is not a shallow child of this ShadowRoot. | |||
while (!this.contains(activeElement)) { | |||
if (activeElement === this.host) { |
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.
Please add a comment about how the host will not be considered the "activeElement" of a shadowroot.
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.
Added.
LGTM with nit |
…host are now returned.
3fa48d2
to
1f1d211
Compare
@azakus I think the failing tests are unrelated again - are these still expected for the time being? |
LGTM! |
dfreedm
added a commit
that referenced
this pull request
Dec 15, 2015
Fix `activeElement` for ShadowRoot: focused elements in light DOM of host are now returned.
bicknellr
added a commit
that referenced
this pull request
Jan 6, 2016
dfreedm
added a commit
that referenced
this pull request
Jan 7, 2016
Reverts #463: ShadowRoots' activeElement no longer returns elements in light DOM.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.