diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js index f3a97142d6c277cfd8b197e4350956b1e801c1b9..2cfc3c4392902c3846a0f753b785f4ec84002937 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js @@ -723,7 +723,7 @@ require(['TYPO3/CMS/Backend/Utility'], function(Utility) { TYPO3.Backend.ContentContainer.setUrl( currentSubScript + separator + 'id=' + node.attributes.nodeData.id ).then(function () { - tree.selectNode(selectNode); + tree.selectNode(node); }); }, diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js index 8bc06bf2070899dace85b574284cf353d8a5812c..a25e0c9d9c777f0d0e235aa2e9e532cb6f96b10a 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js @@ -347,7 +347,7 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, { }, /** - * Selects a node defined by the page id. + * Selects a node on the main tree defined by the page id. * * @param {int} pageId */ @@ -390,13 +390,13 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, { var self = this; Ext.each(nodePaths, function(nodePath) { callback('/root/' + nodePath.join('/'), 'id', function() { - self.mainTree.selectNode(self.getSelected()); + self.mainTree.selectNode(self.mainTree.getSelectionModel().getSelectedNode()); }); }); }, /** - * Returns the currently selected node + * Returns the currently selected node of the currently active tree * * @return {Ext.tree.TreeNode} */ diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js index 3f46ce69b27cf4ee81455e6e87f827c342a77f26..f460be624aac36dfc15f63664272bd7d6db60d25 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js @@ -233,7 +233,7 @@ require(['TYPO3/CMS/Backend/Utility'], function(Utility) { this.filteringIndicator = null; } } else { - var selectedNode = this.app.getSelected(); + var selectedNodeOnMainTree = this.app.getSelected(); this.app.activeTree = this.filteringTree; if (!this.filteringIndicator) { @@ -245,8 +245,13 @@ require(['TYPO3/CMS/Backend/Utility'], function(Utility) { textField.setHideTrigger(false); this.tree.hide(); this.filteringTree.show().refreshTree(function () { - if (selectedNode) { - this.app.select(selectedNode.attributes.nodeData.id, false); + if (selectedNodeOnMainTree) { + // Try to select the currently selected node in the main tree in the filter tree + var tree = this.app.getTree(); + var node = tree.getRootNode().findChild('realId', selectedNodeOnMainTree.attributes.nodeData.id, true); + if (node) { + tree.selectPath(node.getPath()); + } } textField.focus(); }, this);