fix(gui): close an open folder when the Apps tab is re-entered

The dashboard hides an inactive section and calls onActivate on the way back
in; there is no deactivate hook, so a folder left open survives the round trip
and greets the user still open over a grid they walked away from. Worse,
onActivate's focusSearch then lands the caret in the search box behind the
folder's scrim, and typing filters the grid the card is covering — a modal with
the keyboard pointed outside it.

Shut the folder as the tab comes back: returning to the tab is returning to
the grid.
This commit is contained in:
Nariman Jelveh
2026-08-07 20:43:56 -07:00
parent fd51e2c548
commit decbb4580b
+8
View File
@@ -2512,6 +2512,14 @@ const TabApps = {
},
onActivate ($el_window) {
// A folder is modal over THIS tab's grid, and the dashboard only hides
// an inactive section — it never tells a tab it was left. So one open
// when the user walked off to Files is still open, mid-browse, when
// they come back, with focusSearch about to drop the caret in the
// search box behind its scrim: typing would then filter a grid the
// folder is covering. Coming back to the tab is coming back to the
// grid.
this._closeGroup($el_window, { instant: true });
this.loadApps($el_window);
this.focusSearch($el_window);
},