mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(modal, popover): add ability to temporarily disable focus trapping (#29379)
Issue number: resolves #24646
This commit is contained in:
@ -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';
|
||||
|
Reference in New Issue
Block a user