See https://www.woltlab.com/community/thread/296571-esc-schlie%C3%9Ft-login-dialog-im-acp/
const focusTrap = createFocusTrap(dialog, {
allowOutsideClick: true,
escapeDeactivates(): boolean {
- UiDialog.close(id);
+ const data = _dialogs.get(id)!;
+ if (data.closable) {
+ UiDialog.close(id);
+ }
return false;
},
const focusTrap = (0, focus_trap_1.createFocusTrap)(dialog, {
allowOutsideClick: true,
escapeDeactivates() {
- UiDialog.close(id);
+ const data = _dialogs.get(id);
+ if (data.closable) {
+ UiDialog.close(id);
+ }
return false;
},
fallbackFocus: dialog,