Shadow DOM elements not identified correctly as contained by a parent element for maintain.disabled
MKhowaja opened this issue · comments
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