Reopened dialogs were hidden behind new dialogs
authorAlexander Ebert <ebert@woltlab.com>
Fri, 21 Aug 2020 11:43:04 +0000 (13:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 21 Aug 2020 11:43:04 +0000 (13:43 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js

index af36464c901681e14a03d777fd0b1d3a8683873e..8dbaea1b1176179a8734b324043f1b0117270103 100644 (file)
@@ -491,6 +491,10 @@ define(
                                        window.addEventListener('keyup', _keyupListener);
                                }
                                
+                               // Move the dialog to the front to prevent it being hidden behind already open dialogs
+                               // if it was previously visible.
+                               data.dialog.parentNode.insertBefore(data.dialog, data.dialog.parentNode.firstChild);
+                               
                                elAttr(data.dialog, 'aria-hidden', 'false');
                                elAttr(_container, 'aria-hidden', 'false');
                                elData(_container, 'close-on-click', (data.backdropCloseOnClick ? 'true' : 'false'));