Skip to content
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

Shadow DOM elements not identified correctly as contained by a parent element for maintain.disabled #172

Open
MKhowaja opened this issue Jan 7, 2020 · 0 comments · May be fixed by #173

Comments

@MKhowaja
Copy link

MKhowaja commented Jan 7, 2020

When using ally.maintain.disabled and applying a filter to disable everything on the screen but the elements in the filter, if there are descending elements in the filtered element that are under the shadow DOM, they are not correctly filtered and instead disabled.

This is due to the function call compareDocumentPosition in https://github.com/medialize/ally.js/blob/master/src/util/compare-position.js.

Specifically, the function returns 37 and therefore does not see an element in the shadow DOM as contained.

I created a stackblitz that shows this issue as well as a potential fix to apply in front of the compareDocumentPosition function call

https://stackblitz.com/edit/comparedocumentposition-shadowroot-patch?file=src%2Fapp%2Fapp.component.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant