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 5cd118bdb0
commit bd24821c6c

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

Loading…
Cancel
Save