Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Fix activeElement for ShadowRoot: focused elements in light DOM of host are now returned. #463

Merged
merged 1 commit into from
Dec 15, 2015

Conversation

bicknellr
Copy link
Contributor

No description provided.

@bicknellr
Copy link
Contributor Author

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.

@bicknellr bicknellr force-pushed the bicknellr/activeElement-2 branch from 2d84a63 to 3fa48d2 Compare December 14, 2015 20:01
@bicknellr
Copy link
Contributor Author

Ok, fixed for that case.

@bicknellr
Copy link
Contributor Author

@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) {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@dfreedm
Copy link
Contributor

dfreedm commented Dec 15, 2015

LGTM with nit

@bicknellr bicknellr force-pushed the bicknellr/activeElement-2 branch from 3fa48d2 to 1f1d211 Compare December 15, 2015 18:59
@bicknellr
Copy link
Contributor Author

@azakus I think the failing tests are unrelated again - are these still expected for the time being?

@dfreedm
Copy link
Contributor

dfreedm commented Dec 15, 2015

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.
@dfreedm dfreedm merged commit 69803cb into master Dec 15, 2015
@dfreedm dfreedm deleted the bicknellr/activeElement-2 branch December 15, 2015 19:51
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants