From d84a2dab11aa23d56c3213008424872e1a011279 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Fri, 8 Jul 2022 12:26:46 +1000
Subject: Fix jump-to-direct-child-of-ancestor layout-fail

---
 src/App.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 8e3bd11..434eb08 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -542,7 +542,11 @@ export default defineComponent({
 				layoutNode.addDescendantChain(nodesToAdd, this.tolMap, this.layoutMap);
 				// Expand-to-view on target-node's parent
 				targetNode = this.layoutMap.get(name);
-				await this.onLeafClickHeld(targetNode!.parent!, true);
+				if (targetNode.parent != this.activeRoot){
+					await this.onLeafClickHeld(targetNode!.parent!, true);
+				} else {
+					await this.onLeafClick(targetNode!.parent!, true);
+				}
 				setTimeout(() => this.setLastFocused(targetNode!), this.uiOpts.transitionDuration);
 				this.modeRunning = null;
 				return;
-- 
cgit v1.2.3

