Pārlūkot izejas kodu

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

Vanessa 3 gadi atpakaļ
vecāks
revīzija
41e49713bd
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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;
         }
     }