Adapt fallback for selection
Thanks @darthmaim for pointing this out
This commit is contained in:
parent
8290c4f726
commit
42cf8d3679
@ -10,7 +10,7 @@ var h = require('../../lib/helper')
|
|||||||
function bindSelectionHandler(element, i) {
|
function bindSelectionHandler(element, i) {
|
||||||
function getRangeNode() {
|
function getRangeNode() {
|
||||||
var selection = window.getSelection ? window.getSelection() :
|
var selection = window.getSelection ? window.getSelection() :
|
||||||
document.getSelection ? document.getSelection() : {rangeCount: 0};
|
document.getSelection ? document.getSelection() : '';
|
||||||
if (selection.toString().length === 0) {
|
if (selection.toString().length === 0) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user