editor: lists fix - do not touch context root on list creation
[fnpeditor.git] / src / editor / plugins / core / lists.js
index 7a9d321..c6de730 100644 (file)
@@ -12,6 +12,10 @@ var getBoundriesForAList = function(fragment) {
     }
     if(fragment instanceof fragment.NodeFragment) {
         node = fragment.node.getNearestElementNode();
+        if(node.isContextRoot()) {
+            node = fragment.node;
+        }
+
         return {
             node1: node,
             node2: node