From 41e49713bd280a3529ac77dbbce1ebb3cf5db99a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 29 Jul 2022 16:39:04 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5525 --- app/src/protyle/util/selection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts index cd87f6182..30ef60014 100644 --- a/app/src/protyle/util/selection.ts +++ b/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; } }