1
0
mirror of https://github.com/flarum/core.git synced 2025-07-15 05:46:24 +02:00

fix: Allow outside click on modal focus trap

Without this, alerts triggered while a modal is open can't be dismissed.
This commit is contained in:
Alexander Skvortsov
2022-01-08 18:40:27 -05:00
committed by Alexander Skvortsov
parent 3aa47d20ee
commit 268d44e89d

View File

@ -49,7 +49,7 @@ export default class ModalManager extends Component<IModalManagerAttrs> {
// e.g. via ESC key or a click on the modal backdrop.
this.$().on('hidden.bs.modal', this.attrs.state.close.bind(this.attrs.state));
this.focusTrap = createFocusTrap(this.element as HTMLElement);
this.focusTrap = createFocusTrap(this.element as HTMLElement, { allowOutsideClick: true });
}
onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {