Browse Source

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

Vanessa 2 years ago
parent
commit
eb47e5ab68
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/src/protyle/toolbar/index.ts

+ 3 - 1
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;
         }