From 0c3d3b229ea3db907812755b3fc937c8396a69a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 4 Dec 2019 14:42:06 +0100 Subject: [PATCH] Checking nodeType on activeNode to ensure that nodes originate from the same treeAlias --- .../directives/components/tree/umbtreeitem.directive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js index 975b10d678..0a6eeb8835 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js @@ -90,7 +90,9 @@ angular.module("umbraco.directives") css.push("umb-tree-item--deleted"); } - if (actionNode) { + // checking the nodeType to ensure that this node and actionNode is from the same treeAlias + if (actionNode && actionNode.nodeType === node.nodeType) { + if (actionNode.id === node.id && String(node.id) !== "-1") { css.push("active"); }