From fbe6225681b796daaf9d2f3240a024ba9943d1a1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 22 Mar 2016 10:06:42 +0100 Subject: [PATCH] Don't attempt to use the cursor selection when it has length 0 RTWYSIWYG-20 RTWYSIWYG-24 --- www/common/cursor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/common/cursor.js b/www/common/cursor.js index 583a8860b..069f896c7 100644 --- a/www/common/cursor.js +++ b/www/common/cursor.js @@ -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);