mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
caretPosition: fix loading when iframe is hidden
This commit is contained in:
parent
8baacd514e
commit
3c087af038
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ const getSelectionRange = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const selection = window.getSelection();
|
const selection = window.getSelection();
|
||||||
if (selection.rangeCount > 0) {
|
if (selection && selection.type !== 'None' && selection.rangeCount > 0) {
|
||||||
return selection.getRangeAt(0);
|
return selection.getRangeAt(0);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue