Fix the parent element for the image viewer
authorAlexander Ebert <ebert@woltlab.com>
Sat, 11 Jan 2025 12:50:17 +0000 (13:50 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 11 Jan 2025 12:50:17 +0000 (13:50 +0100)
See https://www.woltlab.com/community/thread/310578-imageviewer-hinter-neuem-dialog/

ts/WoltLabSuite/Core/Component/Image/Viewer.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js

index 2f3069a7e68d241b39c9449c821763726d0e6a76..305b3c4e8f368ee59cec9356599e69cf3574bfd8 100644 (file)
@@ -1,6 +1,7 @@
 import { Fancybox } from "@fancyapps/ui";
 import { userSlideType } from "@fancyapps/ui/types/Carousel/types";
 import { OptionsType } from "@fancyapps/ui/types/Fancybox/options";
+import { getPageOverlayContainer } from "WoltLabSuite/Core/Helper/PageOverlay";
 
 const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"];
 
@@ -26,6 +27,7 @@ export async function createFancybox(userSlides?: Array<userSlideType>): Promise
 async function getDefaultConfig(): Promise<Partial<OptionsType>> {
   return {
     l10n: await getLocalization(),
+    parentEl: getPageOverlayContainer(),
     Html: {
       videoAutoplay: false,
     },
index 0522cdabf34c514bae00ab1e4d0b95c48adb5383..0ddeec0d2e3d33a055c13d0916ccff7590ff523d 100644 (file)
@@ -31,7 +31,7 @@ var __importStar = (this && this.__importStar) || (function () {
         return result;
     };
 })();
-define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1) {
+define(["require", "exports", "@fancyapps/ui", "WoltLabSuite/Core/Helper/PageOverlay"], function (require, exports, ui_1, PageOverlay_1) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
     exports.setup = setup;
@@ -58,6 +58,7 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1
     async function getDefaultConfig() {
         return {
             l10n: await getLocalization(),
+            parentEl: (0, PageOverlay_1.getPageOverlayContainer)(),
             Html: {
                 videoAutoplay: false,
             },