From d362524d0e2a91013381e99392a228b59bf0e335 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 19 Jun 2025 18:00:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/10414 --- app/src/protyle/render/av/gallery/util.ts | 4 ++++ app/src/protyle/render/av/view.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/render/av/gallery/util.ts b/app/src/protyle/render/av/gallery/util.ts index dcda78103..b4317a6d4 100644 --- a/app/src/protyle/render/av/gallery/util.ts +++ b/app/src/protyle/render/av/gallery/util.ts @@ -227,6 +227,7 @@ export const openGalleryItemMenu = (options: { target: HTMLElement, blockElement: HTMLElement, protyle: IProtyle, + returnMenu: boolean }) => { const menu = new Menu(); const avID = options.blockElement.getAttribute("data-av-id"); @@ -267,6 +268,9 @@ export const openGalleryItemMenu = (options: { } } }); + if (options.returnMenu) { + return menu; + } const rect = options.target.getBoundingClientRect(); menu.open({ x: rect.left, diff --git a/app/src/protyle/render/av/view.ts b/app/src/protyle/render/av/view.ts index 5485d3996..f73aca662 100644 --- a/app/src/protyle/render/av/view.ts +++ b/app/src/protyle/render/av/view.ts @@ -291,7 +291,7 @@ export const getSwitcherHTML = (views: IAVView[], viewId: string) => { html += `