Skip to content

Commit

Permalink
Merge pull request #12402 from mmorgan4x/focus-trap-fix
Browse files Browse the repository at this point in the history
#12349 focus trap breaking on elements whose ancestors are hidden
  • Loading branch information
cetincakiroglu authored Dec 28, 2022
2 parents 178508e + 73fb9a1 commit 3d3aa78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export class DomHandler {

let visibleFocusableElements = [];
for (let focusableElement of focusableElements) {
if (getComputedStyle(focusableElement).display != 'none' && getComputedStyle(focusableElement).visibility != 'hidden') visibleFocusableElements.push(focusableElement);
if (!!(focusableElement.offsetWidth || focusableElement.offsetHeight || focusableElement.getClientRects().length)) visibleFocusableElements.push(focusableElement);
}
return visibleFocusableElements;
}
Expand Down

0 comments on commit 3d3aa78

Please sign in to comment.