mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-08 13:46:10 +02:00
caretPosition: Delete no-op Range.detach() call
This commit is contained in:
parent
5e731dfbfd
commit
1dbdaf93d7
@ -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;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user