mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Fixed caret positioning
This commit is contained in:
parent
865f2e565a
commit
b7e0e6b216
2 changed files with 3 additions and 3 deletions
|
@ -3010,7 +3010,7 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
};
|
||||
}
|
||||
};
|
||||
const browserSelection = window.getSelection();
|
||||
const browserSelection = targetDoc.getSelection();
|
||||
if (browserSelection) {
|
||||
browserSelection.removeAllRanges();
|
||||
if (selection) {
|
||||
|
@ -3153,7 +3153,7 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
browserSelection.anchorOffset === range.endOffset,
|
||||
};
|
||||
|
||||
if (selection.startPoint.node.ownerDocument !== window.document) {
|
||||
if (selection.startPoint.node.ownerDocument !== targetDoc) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue