From 926f304f00fd207bb24cf5c354cf4533abdcac48 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Aleksander=20=C5=81ukasz?=
 <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Thu, 26 Jun 2014 09:37:03 +0200
Subject: [PATCH] editor: lists fix - do not touch context root on list
 creation

This stops including context root node into a new list.
---
 src/editor/plugins/core/lists.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/editor/plugins/core/lists.js b/src/editor/plugins/core/lists.js
index 7a9d321..c6de730 100644
--- a/src/editor/plugins/core/lists.js
+++ b/src/editor/plugins/core/lists.js
@@ -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
-- 
2.20.1