From 46253fb80a61df149e3561bb04447e41c715d6e8 Mon Sep 17 00:00:00 2001 From: jelveh Date: Sun, 26 Jul 2026 22:23:54 -0700 Subject: [PATCH] Disable hover during rubberband file select MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a `rubberband-selecting` state on the dashboard while marquee selection is active in `TabFiles`, and remove it when drag ends. CSS now disables pointer events on surrounding files chrome (sidebar, directory tree, and header) during that state so hover highlights/tooltips don’t trigger when the cursor leaves the clamped selection area. --- src/gui/src/UI/Dashboard/TabFiles.js | 6 ++++++ src/gui/src/css/dashboard.css | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 3f3203cec..530524546 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -3872,6 +3872,11 @@ const TabFiles = { // Disable pointer events on selection actions bar during drag _this.$el_window.find('.files-selection-actions').addClass('rubberband-active'); + // The marquee is clamped to the files container but the cursor + // isn't — while the drag is active, the chrome around the list + // (sidebars, path bar) must not show hover feedback under it. + _this.$el_window.find('.dashboard').addClass('rubberband-selecting'); + // Create selection area element only when drag actually starts (after threshold) selection_area = document.createElement('div'); $(filesContainer).append(selection_area); @@ -3938,6 +3943,7 @@ const TabFiles = { } // Re-enable pointer events on selection actions bar _this.$el_window.find('.files-selection-actions').removeClass('rubberband-active'); + _this.$el_window.find('.dashboard').removeClass('rubberband-selecting'); _this.updateFooterStats(); }); }, diff --git a/src/gui/src/css/dashboard.css b/src/gui/src/css/dashboard.css index 7bc08a739..a8d1925ab 100644 --- a/src/gui/src/css/dashboard.css +++ b/src/gui/src/css/dashboard.css @@ -2067,6 +2067,15 @@ body.myapps-reordering .myapps-tile { pointer-events: none; } +/* The marquee is clamped to the files container but the cursor isn't; + while a rubber-band drag is active, the chrome around the list must + not react to the cursor passing over it (hover highlights, tooltips). */ +.dashboard.rubberband-selecting .dashboard-sidebar, +.dashboard.rubberband-selecting .dashboard-section-files .directories, +.dashboard.rubberband-selecting .dashboard-section-files .directory-contents .header { + pointer-events: none; +} + .dashboard-section-files .selection-action-btn { display: flex; align-items: center;