From 9f25a63a0839e9bc23f4730c7d2386a96123bb58 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 11 Jan 2025 13:50:17 +0100 Subject: [PATCH] Fix the parent element for the image viewer See https://www.woltlab.com/community/thread/310578-imageviewer-hinter-neuem-dialog/ --- ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 2 ++ .../files/js/WoltLabSuite/Core/Component/Image/Viewer.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index 2f3069a7e6..305b3c4e8f 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -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): Promise async function getDefaultConfig(): Promise> { return { l10n: await getLocalization(), + parentEl: getPageOverlayContainer(), Html: { videoAutoplay: false, }, diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index 0522cdabf3..0ddeec0d2e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -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, }, -- 2.20.1