Skip to content

Commit

Permalink
Merge pull request #12431 from primefaces/revert-12402-focus-trap-fix
Browse files Browse the repository at this point in the history
Revert "#12349 focus trap breaking on elements whose ancestors are hidden"
  • Loading branch information
cetincakiroglu authored Dec 28, 2022
2 parents 69b9e6a + 07480b4 commit dea5a89
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 (!!(focusableElement.offsetWidth || focusableElement.offsetHeight || focusableElement.getClientRects().length)) visibleFocusableElements.push(focusableElement);
if (getComputedStyle(focusableElement).display != 'none' && getComputedStyle(focusableElement).visibility != 'hidden') visibleFocusableElements.push(focusableElement);
}
return visibleFocusableElements;
}
Expand Down

0 comments on commit dea5a89

Please sign in to comment.