Removing bullet/enum from list item containing nested list
[fnpeditor.git] / modules / documentCanvas / canvasManager.js
index da9b941..5edd4be 100644 (file)
@@ -217,17 +217,17 @@ Manager.prototype.command = function(command, meta) {
     \r
     if(command === 'createList') {\r
         var node = canvasNode.create(pos.parentNode);\r
-        if(window.getSelection().getRangeAt().collapsed && this.canvas.nodeInsideList({node: node})) {\r
+        if(window.getSelection().getRangeAt(0).collapsed && this.canvas.nodeInsideList({node: node})) {\r
             this.canvas.listRemove({pointer: node});\r
             this.selectNode(node, {movecaret: 'end'});\r
             this.sandbox.publish('contentChanged');\r
         }\r
         else {\r
-            if(!this.canvas.nodeInsideList({node: node})) {\r
+            //if(!this.canvas.nodeInsideList({node: node})) {\r
                 this.canvas.listCreate({start: node, end: canvasNode.create(pos.focusNode), type: meta});\r
                 this.selectNode(node, {movecaret: 'end'});\r
                 this.sandbox.publish('contentChanged');\r
-            }\r
+            //}\r
         }\r
     }\r
 \r