Skip to content

Commit

Permalink
Update src/helpers/tabbable.js
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Dias <[email protected]>
  • Loading branch information
stevematney and diasbruno committed Nov 10, 2021
1 parent edc4f12 commit b049feb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/helpers/tabbable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ function hidesContents(element) {

function visible(element) {
let parentElement = element;
let rootNode =
typeof element.getRootNode === "function"
? element.getRootNode()
: undefined;
let rootNode = element.getRootNode && element.getRootNode();
while (parentElement) {
if (parentElement === document.body) break;
if (rootNode && parentElement === rootNode) parentElement = rootNode.host;
Expand Down

0 comments on commit b049feb

Please sign in to comment.