From: Aleksander Ɓukasz Date: Fri, 28 Jun 2013 08:35:30 +0000 (+0200) Subject: Fix X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/8bf6c2bb6ef0a358a3591d19d6aff7a1f7f22b92 Fix --- diff --git a/modules/documentCanvas/canvasManager.js b/modules/documentCanvas/canvasManager.js index a42eee6..5edd4be 100644 --- a/modules/documentCanvas/canvasManager.js +++ b/modules/documentCanvas/canvasManager.js @@ -217,7 +217,7 @@ Manager.prototype.command = function(command, meta) { if(command === 'createList') { var node = canvasNode.create(pos.parentNode); - if(window.getSelection().getRangeAt().collapsed && this.canvas.nodeInsideList({node: node})) { + if(window.getSelection().getRangeAt(0).collapsed && this.canvas.nodeInsideList({node: node})) { this.canvas.listRemove({pointer: node}); this.selectNode(node, {movecaret: 'end'}); this.sandbox.publish('contentChanged');