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; } }