From b33289a3a89915e0418ffe66b34e540aa3ab75ba Mon Sep 17 00:00:00 2001
From: =?utf8?q?Aleksander=20=C5=81ukasz?=
 <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Sun, 8 Dec 2013 22:34:40 +0100
Subject: [PATCH] Removing unnecessary element detach logic from Canvas
 DocumentNodeElement

All of this logic is now handled properly at the wlxml.js level and
Canvas reacts accordingly through document events handling.
---
 .../documentCanvas/canvas/documentElement.js        | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js
index 1c0719f..210c492 100644
--- a/src/editor/modules/documentCanvas/canvas/documentElement.js
+++ b/src/editor/modules/documentCanvas/canvas/documentElement.js
@@ -195,19 +195,6 @@ $.extend(DocumentNodeElement.prototype, {
         return this.dom().children('[document-element-content]');
     },
     detach: function() {
-        var parent = this.parent();
-        if(!parent)
-            return;
-
-        var parentChildren = parent.children(),
-            myIdx = parent.childIndex(this);
-
-        if(myIdx > 0 && myIdx < parentChildren.length) {
-            if((parentChildren[myIdx-1] instanceof DocumentTextElement) && (parentChildren[myIdx+1] instanceof DocumentTextElement)) {
-                parentChildren[myIdx-1].appendText(parentChildren[myIdx+1].getText());
-                parentChildren[myIdx+1].detach();
-            }
-        }
         this.dom().detach();
         this.canvas = null;
         return this;
-- 
2.20.1