From e77845075eaa813b5c8bf765023e0423f4327780 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 11 Jul 2022 13:53:33 +1000
Subject: Fix auto-hide sometimes auto-collapsing an ancestor

---
 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 4f93cee..ecf2948 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -279,7 +279,11 @@ export default defineComponent({
 						while (node.parent != this.activeRoot){
 							node = node.parent!;
 						}
-						await this.onNonleafClickHeld(node, true);
+						// Hide ancestor
+							// Note: Not using onNonleafClickHeld() here to avoid a relayoutWithCollapse()
+						LayoutNode.hideUpward(node, this.layoutMap);
+						this.activeRoot = node;
+						// Try relayout
 						this.updateAreaDims();
 						success = tryLayout(this.activeRoot, this.tileAreaDims, this.lytOpts, lytFnOpts);
 					}
-- 
cgit v1.2.3

