mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
caretPosition: Delete no-op Range.detach()
call
This commit is contained in:
parent
5e731dfbfd
commit
1dbdaf93d7
1 changed files with 0 additions and 2 deletions
|
@ -14,7 +14,6 @@ exports.getPosition = () => {
|
||||||
if (selectionIsInTheBeginningOfLine) {
|
if (selectionIsInTheBeginningOfLine) {
|
||||||
const clonedRange = createSelectionRange(range);
|
const clonedRange = createSelectionRange(range);
|
||||||
line = getPositionOfElementOrSelection(clonedRange);
|
line = getPositionOfElementOrSelection(clonedRange);
|
||||||
clonedRange.detach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// when there's a <br> or any element that has no height, we can't get
|
// 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]);
|
clonedRange.selectNode(shadowCaret[0]);
|
||||||
|
|
||||||
line = getPositionOfElementOrSelection(clonedRange);
|
line = getPositionOfElementOrSelection(clonedRange);
|
||||||
clonedRange.detach();
|
|
||||||
shadowCaret.remove();
|
shadowCaret.remove();
|
||||||
return line;
|
return line;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue