diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-19 21:08:06 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-19 21:08:06 -0700 |
commit | e22699cfccf76edd1fcad1e75d847476c7ca6a55 (patch) | |
tree | 2155f86c7d14932594b24d486b48e7652be43c13 /ext/fg | |
parent | d5b4b0499842023fab57a8231d7e0eb80737deab (diff) |
bugfix and version1.3.3
Diffstat (limited to 'ext/fg')
-rw-r--r-- | ext/fg/js/document.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js index 26c85b40..b1e71777 100644 --- a/ext/fg/js/document.js +++ b/ext/fg/js/document.js @@ -76,7 +76,7 @@ function docRangeFromPoint(point) { if (!document.caretRangeFromPoint) { document.caretRangeFromPoint = (x, y) => { const position = document.caretPositionFromPoint(x,y); - if (position) { + if (position && position.offsetNode) { const range = document.createRange(); range.setStart(position.offsetNode, position.offset); range.setEnd(position.offsetNode, position.offset); |