From d80ba5bf9c0d447e3108641ea04989cb66894ae4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 17 Aug 2023 18:59:50 +0200 Subject: [PATCH] Fix the handling of non dialogs inside the dialog container See #5627 --- ts/WoltLabSuite/Core/Ui/Dialog.ts | 2 +- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/Dialog.ts b/ts/WoltLabSuite/Core/Ui/Dialog.ts index c1596460e9..ace02fe8d2 100644 --- a/ts/WoltLabSuite/Core/Ui/Dialog.ts +++ b/ts/WoltLabSuite/Core/Ui/Dialog.ts @@ -808,7 +808,7 @@ const UiDialog = { _activeDialog = null; for (let i = 0; i < _container.childElementCount; i++) { const child = _container.children[i] as HTMLElement; - if (!Core.stringToBool(child.getAttribute("aria-hidden"))) { + if (child.classList.contains("dialogContainer") && !Core.stringToBool(child.getAttribute("aria-hidden"))) { _activeDialog = child.dataset.id || ""; break; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index 071603ae14..c481bd3c2a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -664,7 +664,7 @@ define(["require", "exports", "tslib", "../Core", "../Dom/Change/Listener", "./S _activeDialog = null; for (let i = 0; i < _container.childElementCount; i++) { const child = _container.children[i]; - if (!Core.stringToBool(child.getAttribute("aria-hidden"))) { + if (child.classList.contains("dialogContainer") && !Core.stringToBool(child.getAttribute("aria-hidden"))) { _activeDialog = child.dataset.id || ""; break; } -- 2.20.1