diff --git a/src/js/util.js b/src/js/util.js index f4581f5..db5cec4 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -20,7 +20,7 @@ function getSelectionText(doc) { } function getSelectionStart(doc) { - var node = doc.getSelection().anchorNode, + var node = doc.getSelection().baseNode ? doc.getSelection().baseNode : doc.getSelection().anchorNode, startNode = (node && node.nodeType === 3 ? node.parentNode : node); return startNode;