Don't attempt to use the cursor selection when it has length 0

RTWYSIWYG-20
RTWYSIWYG-24
pull/1/head
ansuz 9 years ago
parent de6db0285c
commit fbe6225681

@ -136,10 +136,9 @@ define([
verbose("cursor.update"); verbose("cursor.update");
root = root || inner; root = root || inner;
sel = sel || Rangy.getSelection(root); sel = sel || Rangy.getSelection(root);
// FIXME under what circumstances are no ranges found?
if (!sel.rangeCount) { if (!sel.rangeCount) {
error('[cursor.update] no ranges found'); error('[cursor.update] no ranges found');
//return 'no ranges found'; return;
} }
var range = sel.getRangeAt(0); var range = sel.getRangeAt(0);

Loading…
Cancel
Save