From: Aleksander Ɓukasz Date: Thu, 26 Jun 2014 07:37:03 +0000 (+0200) Subject: editor: lists fix - do not touch context root on list creation X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/926f304f00fd207bb24cf5c354cf4533abdcac48?ds=inline editor: lists fix - do not touch context root on list creation This stops including context root node into a new list. --- 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