From eb47e5ab68e4f2a0ae75f908e189f9eb6006f08c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 19 Nov 2022 11:18:35 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6649 --- app/src/protyle/toolbar/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 5d579ad4f..ecf23d4ae 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -89,7 +89,9 @@ export class Toolbar { return true; } }); - if (hasImg && noText) { + if ((hasImg && noText) || + // 拖拽图片到最右侧 + (range.commonAncestorContainer.nodeType !== 3 && (range.commonAncestorContainer as HTMLElement).classList.contains("img"))) { this.element.classList.add("fn__none"); return; }