mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +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;
|
||||
}
|
||||
const selection = window.getSelection();
|
||||
if (selection.rangeCount > 0) {
|
||||
if (selection && selection.type !== 'None' && selection.rangeCount > 0) {
|
||||
return selection.getRangeAt(0);
|
||||
} else {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue