mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Fix drawer focus trap making login form unclickable on mobile
Adding `clickOutsideDeactivates` seems to fix the issue, contrary to what the focus-trap documentation implies about it being unnecessary.
This commit is contained in:
parent
0c95d28e94
commit
d89031f057
|
@ -27,7 +27,10 @@ export default class Drawer {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.appElement = document.getElementById('app');
|
this.appElement = document.getElementById('app');
|
||||||
this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true });
|
// Despite the `focus-trap` documentation, both `clickOutsideDeactivates`
|
||||||
|
// and `allowOutsideClick` are necessary so that inputs in modals triggered
|
||||||
|
// from the drawer's nav components can be interacted with.
|
||||||
|
this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });
|
||||||
this.drawerAvailableMediaQuery = window.matchMedia(
|
this.drawerAvailableMediaQuery = window.matchMedia(
|
||||||
`(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`
|
`(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user