[TASK] Do no load page after title change if it's not the active one 91/45391/8
authorGianluigi Martino <gmartino27@gmail.com>
Mon, 21 Dec 2015 14:17:31 +0000 (15:17 +0100)
committerNicole Cordes <typo3@cordes.co>
Fri, 29 Jan 2016 14:03:29 +0000 (15:03 +0100)
Do not load the page in the page tree after renaming, if it isn't the
currently active one.

Change-Id: Idf6b789f07fbd28ef0c5ec1e630e3dca2dc73119
Resolves: #72238
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/45391
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js

index 2f491ba..68c7341 100644 (file)
@@ -775,7 +775,13 @@ TYPO3.Components.PageTree.Actions = {
                                                Ext.util.Format.htmlEncode(oldText)
                                        );
                                }
-                               this.singleClick(treeEditor.editNode, treeEditor.editNode.ownerTree);
+                               var currentTree = treeEditor.editNode.getOwnerTree();
+                               if (currentTree.currentSelectedNode !== null) {
+                                       if (currentTree.currentSelectedNode.id === treeEditor.editNode.id) {
+                                               this.singleClick(treeEditor.editNode, treeEditor.editNode.ownerTree, currentTree);
+                                       }
+                                       currentTree.currentSelectedNode.select();
+                               }
                        },
                        this
                );