Close overlays after tab change
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 15 Jan 2024 14:01:05 +0000 (15:01 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 15 Jan 2024 14:01:05 +0000 (15:01 +0100)
ts/WoltLabSuite/Core/Ui/TabMenu/Simple.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/TabMenu/Simple.js

index 390ad949c844c2dcbb8a618091d3944f3c35b991..d75fefdc6773c63ac056c767c97c8b9e9b1b2793 100644 (file)
@@ -10,6 +10,7 @@ import * as DomTraverse from "../../Dom/Traverse";
 import DomUtil from "../../Dom/Util";
 import * as Environment from "../../Environment";
 import * as EventHandler from "../../Event/Handler";
+import CloseOverlay from "WoltLabSuite/Core/Ui/CloseOverlay";
 
 class TabMenuSimple {
   private readonly container: HTMLElement;
@@ -319,6 +320,7 @@ class TabMenuSimple {
       // update history
       window.history.replaceState(undefined, "", location);
     }
+    CloseOverlay.execute();
 
     void import("../TabMenu").then((UiTabMenu) => {
       UiTabMenu.scrollToTab(tab!);
index e2d5ffe213eb18484adac17673fa5db10fce6e91..cecf8c5d14f37c0669d7d7f4ff20bf69f1397dae 100644 (file)
@@ -5,12 +5,13 @@
  * @copyright  2001-2019 WoltLab GmbH
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
-define(["require", "exports", "tslib", "../../Dom/Traverse", "../../Dom/Util", "../../Environment", "../../Event/Handler"], function (require, exports, tslib_1, DomTraverse, Util_1, Environment, EventHandler) {
+define(["require", "exports", "tslib", "../../Dom/Traverse", "../../Dom/Util", "../../Environment", "../../Event/Handler", "WoltLabSuite/Core/Ui/CloseOverlay"], function (require, exports, tslib_1, DomTraverse, Util_1, Environment, EventHandler, CloseOverlay_1) {
     "use strict";
     DomTraverse = tslib_1.__importStar(DomTraverse);
     Util_1 = tslib_1.__importDefault(Util_1);
     Environment = tslib_1.__importStar(Environment);
     EventHandler = tslib_1.__importStar(EventHandler);
+    CloseOverlay_1 = tslib_1.__importDefault(CloseOverlay_1);
     class TabMenuSimple {
         container;
         containers = new Map();
@@ -266,6 +267,7 @@ define(["require", "exports", "tslib", "../../Dom/Traverse", "../../Dom/Util", "
                 // update history
                 window.history.replaceState(undefined, "", location);
             }
+            CloseOverlay_1.default.execute();
             void new Promise((resolve_1, reject_1) => { require(["../TabMenu"], resolve_1, reject_1); }).then(tslib_1.__importStar).then((UiTabMenu) => {
                 UiTabMenu.scrollToTab(tab);
             });