editor: handle situation when element doesn't implement getVerticallyFirstTextElement
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / documentElement.js
index 8a5193b..d40ca9b 100644 (file)
@@ -154,6 +154,9 @@ $.extend(DocumentNodeElement.prototype, {
     detach: function(isChild) {
         var parents;
 
+        if(this.gutterGroup) {
+            this.gutterGroup.remove();
+        }
         if(_.isFunction(this.children)) {
             this.children().forEach(function(child) {
                 child.detach(true);