diff --git a/src/static/js/caretPosition.js b/src/static/js/caretPosition.js index 1610219de..2b80b9879 100644 --- a/src/static/js/caretPosition.js +++ b/src/static/js/caretPosition.js @@ -14,7 +14,6 @@ exports.getPosition = () => { if (selectionIsInTheBeginningOfLine) { const clonedRange = createSelectionRange(range); line = getPositionOfElementOrSelection(clonedRange); - clonedRange.detach(); } // when there's a
or any element that has no height, we can't get @@ -28,7 +27,6 @@ exports.getPosition = () => { clonedRange.selectNode(shadowCaret[0]); line = getPositionOfElementOrSelection(clonedRange); - clonedRange.detach(); shadowCaret.remove(); return line; };