feat(modal, popover): add ability to temporarily disable focus trapping (#29379)

Issue number: resolves #24646
This commit is contained in:
Liam DeBeasi
2024-04-25 09:57:43 -04:00
committed by GitHub
parent e38e2e4d35
commit 7c00351680
11 changed files with 130 additions and 8 deletions

View File

@ -199,7 +199,7 @@ const trapKeyboardFocus = (ev: Event, doc: Document) => {
* behind the sheet should be focusable until
* the backdrop is enabled.
*/
if (lastOverlay.classList.contains('ion-disable-focus-trap')) {
if (lastOverlay.classList.contains(FOCUS_TRAP_DISABLE_CLASS)) {
return;
}
@ -990,3 +990,5 @@ const revealOverlaysToScreenReaders = () => {
}
}
};
export const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';