Don't attempt to use the cursor selection when it has length 0
RTWYSIWYG-20 RTWYSIWYG-24
This commit is contained in:
parent
5cd118bdb0
commit
bd24821c6c
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue