From: Alexander Ebert Date: Wed, 19 Jul 2023 14:18:01 +0000 (+0200) Subject: Closing dialogs with Esc should close and detach the dialog X-Git-Tag: 6.0.0_Alpha_7~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ceeb590f3b19c625a8b4077c7764c420c20ee58;p=GitHub%2FWoltLab%2FWCF.git Closing dialogs with Esc should close and detach the dialog See https://www.woltlab.com/community/thread/300742-seite-nicht-mehr-scrollbar-wenn-dialog-mittels-esc-geschlossen-wird/ --- diff --git a/ts/WoltLabSuite/Core/Element/woltlab-core-dialog.ts b/ts/WoltLabSuite/Core/Element/woltlab-core-dialog.ts index aaa1b4ac5a..39aceafb26 100644 --- a/ts/WoltLabSuite/Core/Element/woltlab-core-dialog.ts +++ b/ts/WoltLabSuite/Core/Element/woltlab-core-dialog.ts @@ -277,6 +277,8 @@ export class WoltlabCoreDialogElement extends HTMLElement { event.preventDefault(); return; } + + this.#detachDialog(); }); // Close the dialog by clicking on the backdrop. diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Element/woltlab-core-dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Element/woltlab-core-dialog.js index 618d373e8b..c8b024a24e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Element/woltlab-core-dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Element/woltlab-core-dialog.js @@ -211,6 +211,7 @@ define(["require", "exports", "tslib", "../Dom/Util", "../Helper/PageOverlay", " event.preventDefault(); return; } + this.#detachDialog(); }); // Close the dialog by clicking on the backdrop. //