mirror of
https://github.com/flarum/core.git
synced 2025-07-15 13:56:23 +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:
committed by
Alexander Skvortsov
parent
3aa47d20ee
commit
268d44e89d
@ -49,7 +49,7 @@ export default class ModalManager extends Component<IModalManagerAttrs> {
|
|||||||
// e.g. via ESC key or a click on the modal backdrop.
|
// 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.$().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 {
|
onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {
|
||||||
|
Reference in New Issue
Block a user