From 62850f8cc34bf556bb3ca1dbf66317d7b8e8e81b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 29 Jun 2025 22:13:12 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15173 --- app/src/protyle/util/clearSelect.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/clearSelect.ts b/app/src/protyle/util/clearSelect.ts index a15a00e72..f010919cb 100644 --- a/app/src/protyle/util/clearSelect.ts +++ b/app/src/protyle/util/clearSelect.ts @@ -1,6 +1,6 @@ import {updateHeader} from "../render/av/row"; -export const clearSelect = (types: ("av" | "img" | "cell" | "row"|"galleryItem")[], element: Element) => { +export const clearSelect = (types: ("av" | "img" | "cell" | "row" | "galleryItem")[], element: Element) => { if (types.includes("cell")) { element.querySelectorAll(".av__cell--select, .av__cell--active").forEach((item: HTMLElement) => { item.querySelector(".av__drag-fill")?.remove(); diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 0852fb68d..e41ddac31 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -622,6 +622,7 @@ export class WYSIWYG { // https://github.com/siyuan-note/siyuan/issues/15100 if (galleryItemElement) { + clearSelect(["galleryItem"], protyle.wysiwyg.element); return; } const avDragFillElement = hasClosestByClassName(target, "av__drag-fill");