Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: fix https://github.com/siyuan-note/siyuan/issues/6649

Vanessaeb47e5ab68e4
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 5d579ad4f2..ecf23d4ae0 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;
}