[BUGFIX] t3editor: Fix broken childNodes for deleted nodes 39/41839/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 22 Jul 2015 16:42:13 +0000 (18:42 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 22 Jul 2015 19:27:30 +0000 (21:27 +0200)
Reset the tree node of a deleted element properly for being
rewritten when the deleted elements gets redefined.

Resolves: #68441
Releases: master
Change-Id: Ie1b8008db3f75fc34f9038e5f20412cd70b25e8a
Reviewed-on: http://review.typo3.org/41839
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/t3editor/Resources/Public/JavaScript/Plugins/CodeCompletion/TsParser.js

index d2960c0..b8c1c4a 100644 (file)
@@ -436,12 +436,11 @@ define('TYPO3/CMS/T3editor/Plugins/CodeCompletion/TsParser', [
         * creates nodes if necessary, empties the value and childNodes-Array
         */
        TsParser.deleteTreeNodeValue = function(path) {
-               var treeNode = TsPatser.getTreeNode(path);
+               var treeNode = TsParser.getTreeNode(path);
                // currently the node is not deleted really, it's just not displayed cause value == null
                // deleting it would be a cleaner solution
                treeNode.value = null;
-               treeNode.childNodes = null;
-               treeNode = null;
+               treeNode.childNodes = {};
        };
 
        /**