From 3bd73a4b3ff79145751f7906d86e6d3fe322dd2a Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Fri, 23 Oct 2026 14:13:04 -0700 Subject: [PATCH] fix(dashboard): clear a drop target's highlight after the drop jQuery UI fires no `out` on drop, so the folder row a selection was dropped on stayed selected (and went to the Trash with the next Delete), a sidebar folder stayed highlighted as the current one, and a breadcrumb kept its drop outline. --- src/gui/src/UI/Dashboard/TabFiles.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 1f8e54987..84e1b735c 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -379,6 +379,11 @@ const TabFiles = { clearTimeout(_this.folderDwellTimer); _this.folderDwellTimer = null; _this.folderDwellTarget = null; + // A drop fires no `out`, so undo `over`'s highlight here. + $(folderElement).removeClass('dwell-opening'); + if ( folderElement.getAttribute('data-path') !== _this.currentPath ) { + $(folderElement).removeClass('active'); + } // Block if ctrl and trashed const draggedPath = $(ui.draggable).attr('data-path'); @@ -2527,7 +2532,8 @@ const TabFiles = { clearTimeout(_this.folderDwellTimer); _this.folderDwellTimer = null; _this.folderDwellTarget = null; - $(dirnameElement).removeClass('dwell-opening'); + // A drop fires no `out`, so undo `over`'s highlight here. + $(dirnameElement).removeClass('dwell-opening drop-target'); const targetPath = $(this).attr('data-path'); const draggedPath = $(ui.draggable).attr('data-path'); @@ -3484,6 +3490,8 @@ const TabFiles = { clearTimeout(_this.folderDwellTimer); _this.folderDwellTimer = null; _this.folderDwellTarget = null; + // A drop fires no `out`, so undo `over`'s highlight here. + $(el_item).removeClass('selected dwell-opening'); // A row drawn ahead of its mkdir has a predicted path, not // a real one. Moving into it would either fail or — because