X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/12763ff44e918f409a0ede75a4da383d8bdc6d95..ed7551a2490c5a62e87cc316e614e5c211f57dbb:/modules/documentCanvas/canvasManager.js diff --git a/modules/documentCanvas/canvasManager.js b/modules/documentCanvas/canvasManager.js index da9b941..5edd4be 100644 --- a/modules/documentCanvas/canvasManager.js +++ b/modules/documentCanvas/canvasManager.js @@ -217,17 +217,17 @@ 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'); } else { - if(!this.canvas.nodeInsideList({node: node})) { + //if(!this.canvas.nodeInsideList({node: node})) { this.canvas.listCreate({start: node, end: canvasNode.create(pos.focusNode), type: meta}); this.selectNode(node, {movecaret: 'end'}); this.sandbox.publish('contentChanged'); - } + //} } }