Skip to content

Commit

Permalink
Merge pull request #14692 from jasonverber/fix/14691-getFocusableElem…
Browse files Browse the repository at this point in the history
…ents-ancestors-display-none

Fix #14691 DomHandler.getFocusableElements returns visible elements
  • Loading branch information
cetincakiroglu authored Feb 22, 2024
2 parents fdb7932 + 429fc23 commit 10d76cb
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 @@ -630,7 +630,7 @@ export class DomHandler {
let visibleFocusableElements = [];

for (let focusableElement of focusableElements) {
if (getComputedStyle(focusableElement).display != 'none' && getComputedStyle(focusableElement).visibility != 'hidden') visibleFocusableElements.push(focusableElement);
if (this.isVisible(focusableElement) && focusableElement.getComputedStyle(focusableElement).display != 'none' && getComputedStyle(focusableElement).visibility != 'hidden') visibleFocusableElements.push(focusableElement);
}

return visibleFocusableElements;
Expand Down

0 comments on commit 10d76cb

Please sign in to comment.