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 a291134da1
commit f4c29db182

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 {