We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 827796d commit 31d59b2Copy full SHA for 31d59b2
src/helpers/tabbable.js
@@ -18,6 +18,12 @@ function hidesContents(element) {
18
// If the node is empty, this is good enough
19
if (zeroSize && !element.innerHTML) return true;
20
21
+ // if the element is not of type Element e.g. shadowRoot
22
+ // we cannot go any further
23
+ if (!element.isPrototypeOf(Element)) {
24
+ return false;
25
+ }
26
+
27
// Otherwise we need to check some styles
28
const style = window.getComputedStyle(element);
29
return zeroSize
0 commit comments