Skip to content

Commit

Permalink
Merge pull request #14863 from jasonverber/fix/14691-DomHandler-getFo…
Browse files Browse the repository at this point in the history
…cusableElements

Fix #14691 DomHandler.getFocusableElements should return only visible els
  • Loading branch information
cetincakiroglu authored Feb 23, 2024
2 parents da954a8 + c9a33fc commit 15a7a5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ export class DomHandler {
let visibleFocusableElements = [];

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

return visibleFocusableElements;
Expand Down

0 comments on commit 15a7a5f

Please sign in to comment.