You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(browser): let the scrollbar keep its drag instead of starting a marquee - #1959
Dragging the scrollbar handle in a file view started a rubber-band (marquee) selection instead of scrolling.
The marquee's drag gesture sits on the scrolled window in the capture phase, so it sees every press before the scrollbars inside it. It only stepped aside for presses on an item's rendered content. With overlay scrollbars (the GNOME default), the scrollbar is drawn over the blank right-hand part of the rows, so a press on it looked like a press on blank row space: the marquee began and claimed the sequence once the drag crossed the threshold, taking it away from the scrollbar.
The marquee now ignores any press that lands on a gtk::Scrollbar inside its surface, before any item or Alt-force checks, so the scrollbar keeps its own drag. This covers every view that installs the marquee, including Columns.
Reproduced on Ubuntu 24.04 / GNOME Shell 46 Wayland / GTK 4.14.5 (matching the reporter's Zorin OS 18.1), and confirmed fixed there with a build of this branch.
On GNOME (or any desktop with overlay scrollbars), open a folder with enough files to scroll in List, Icons or Columns view.
Hover the right edge so the scrollbar appears, then press on the scrollbar handle and drag it up and down.
Press on blank space in the view and drag.
Expected result: Dragging the handle scrolls the view and no selection rectangle appears or files get selected. Dragging from blank space still draws a selection rectangle as before.
Reviewed and brought up to date with main (merged 70510243d, no conflicts).
The fix is sound: the capture-phase marquee gesture now defers to any gtk::Scrollbar found between the pick result and its surface, and since the Columns surface (LoadPresentation.stack) wraps the scrolled window, the check covers List, Icons, Columns and inline search alike. The new regression test is behavioral (a press on the scrollbar leaves the marquee inactive, a press on blank viewport still starts one), so it stays.
Only change beyond the merge: one sentence in docs/architecture.md, which records marquee ownership policy, noting that a viewport's own scrollbars never start a marquee.
Local verification: ui::marquee:: and ui::pointer:: (12 tests, all passing, including the new scrollbar case), cargo fmt --all --check, and cargo clippy --all-targets --all-features -- -D warnings. CI is green on the new head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Dragging the scrollbar handle in a file view started a rubber-band (marquee) selection instead of scrolling.
The marquee's drag gesture sits on the scrolled window in the capture phase, so it sees every press before the scrollbars inside it. It only stepped aside for presses on an item's rendered content. With overlay scrollbars (the GNOME default), the scrollbar is drawn over the blank right-hand part of the rows, so a press on it looked like a press on blank row space: the marquee began and claimed the sequence once the drag crossed the threshold, taking it away from the scrollbar.
The marquee now ignores any press that lands on a
gtk::Scrollbarinside its surface, before any item or Alt-force checks, so the scrollbar keeps its own drag. This covers every view that installs the marquee, including Columns.Reproduced on Ubuntu 24.04 / GNOME Shell 46 Wayland / GTK 4.14.5 (matching the reporter's Zorin OS 18.1), and confirmed fixed there with a build of this branch.
Visual evidence
Before/After:
screenrecording-2026-10-30_22-48-48.mp4
screenrecording-2026-10-30_23-02-09.mp4
How to test
Expected result: Dragging the handle scrolls the view and no selection rectangle appears or files get selected. Dragging from blank space still draws a selection rectangle as before.
Related issue
Closes #1938