Explorar o código

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

Vanessa %!s(int64=2) %!d(string=hai) anos
pai
achega
eb47e5ab68
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;
                 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");
             this.element.classList.add("fn__none");
             return;
             return;
         }
         }