caretPosition: Delete no-op `Range.detach()` call

pull/4849/head
Richard Hansen 2021-02-22 02:22:17 -05:00 committed by John McLear
parent 5e731dfbfd
commit 1dbdaf93d7
1 changed files with 0 additions and 2 deletions

View File

@ -14,7 +14,6 @@ exports.getPosition = () => {
if (selectionIsInTheBeginningOfLine) {
const clonedRange = createSelectionRange(range);
line = getPositionOfElementOrSelection(clonedRange);
clonedRange.detach();
}
// when there's a <br> 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;
};