Преглед изворни кода

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

Vanessa пре 3 година
родитељ
комит
41e49713bd
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/src/protyle/util/selection.ts

+ 1 - 1
app/src/protyle/util/selection.ts

@@ -95,7 +95,7 @@ export const getEditorRange = (element: Element) => {
     let range: Range;
     if (getSelection().rangeCount > 0) {
         range = getSelection().getRangeAt(0);
-        if (element.isEqualNode(range.startContainer) || element.contains(range.startContainer)) {
+        if (element.isSameNode(range.startContainer) || element.contains(range.startContainer)) {
             return range;
         }
     }