Adopt the page overlay based on `[aria-hidden]`
authorAlexander Ebert <ebert@woltlab.com>
Mon, 6 Nov 2023 17:38:09 +0000 (18:38 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 6 Nov 2023 17:38:09 +0000 (18:38 +0100)
commit562b48f21ae60b6a732b8d4b20f8f7529d037fb2
tree0bd9468303d753d11f5ca154681519fa37d2b97f
parent18e4901b71a7b4ecd66e712ea9c146b3fa7e493f
Adopt the page overlay based on `[aria-hidden]`

The page overlay must be adopted if there is at least one dialog open and must be released again when the last dialog closed. The previous implementation did not work flawlessly if dialogs were stacked and toggled in arbitrary order.

The mutation observer solves the issue because we do not keep track of the number of open dialogs but only if the overlay is visible at all.

See https://www.woltlab.com/community/thread/302088-sporadisch-auftredende-fehlerhafter-verlinkungsmodus-im-editor/
ts/WoltLabSuite/Core/Ui/Dialog.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js