diff options
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/document.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js index 9afc44f0..94a68e6c 100644 --- a/ext/fg/js/document.js +++ b/ext/fg/js/document.js @@ -267,6 +267,9 @@ const caretRangeFromPoint = (() => { // Firefox return (x, y) => { const position = document.caretPositionFromPoint(x, y); + if (position === null) { + return null; + } const node = position.offsetNode; if (node === null) { return null; |