mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +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
a291134da1
commit
f4c29db182
@@ -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