From fd51e2c548668edd36c098aa7d9d7c8ef4ac606b Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Fri, 7 Aug 2026 20:43:38 -0700 Subject: [PATCH] fix(gui): keep a folder name typed right up to the moment it closes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The name box commits on blur, and every exit that goes through a pointer blurs it while the folder is still open — so clicking outside, or launching an app from inside, keeps what was typed. Escape does not: _closeGroup clears _openGroupId first and only then moves focus to the tile below (or removes the card outright), so the blur arrives with no open folder to rename and _renameGroup drops it. A brand-new folder opens with its name selected for exactly this edit, so "type Games, press Escape" — the obvious way to dismiss a dialog — was the path most likely to lose it. Commit the pending name on the way out, before the folder id is gone. --- src/gui/src/UI/Dashboard/TabApps.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/src/UI/Dashboard/TabApps.js b/src/gui/src/UI/Dashboard/TabApps.js index 343673161..3e99c0897 100644 --- a/src/gui/src/UI/Dashboard/TabApps.js +++ b/src/gui/src/UI/Dashboard/TabApps.js @@ -1450,6 +1450,16 @@ const TabApps = { const groupId = this._openGroupId; if ( ! groupId ) return; this._openGroupId = null; + // Commit a name still being typed. Every other way out of the folder + // (clicking outside it, launching an app from it) commits through the + // box's own blur while the folder is still open; closing is the one + // path that blurs it AFTER — handing focus back to the tile below, or + // simply removing the card — so the blur handler would find no open + // folder to rename and the typed name would be dropped on the floor. + const nameEl = $el_window.find('.myapps-group-name')[0]; + if ( nameEl && document.activeElement === nameEl ) { + this._renameGroup($el_window, groupId, nameEl.value); + } clearTimeout(this._createdGroupTimer); if ( this._groupEscHandler ) { document.removeEventListener('keydown', this._groupEscHandler);