-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scrollbar: dragging thumb or clicking track do not work before mouse wheel is used once before #685
Comments
This is by design. You can see the same behaviors in macOS scrollbar, we only can click scrollbar when it appeared (First scroll wheel will show it.). If you don't like this, you can use |
Scrollbar is already there and visible (see screen shot), but no clickable. At least not before mouse wheel is used once. |
Demo:
demo.mp4 |
Try main branch, it was a bug, the scrollbar will show on hover. |
Bug fix was already included in my local branch by merging latest # git log
1feaf72 (HEAD -> main) Merge remote-tracking branch 'upstream/main'
8c4884d (upstream/main, upstream/HEAD) tab: Remove `w_full` from TabBar. (#683)
f8a5302 dock: Fix incorrect extra inner padding in Panels. (#682)
baa9294 Merge remote-tracking branch 'upstream/main'
6c9a317 scrollbar: Fix scroll to show scrollbar. (#681) |
I make a record for this (on main branch newest code), the click and drag is correct. CleanShot.2025-03-04.at.21.55.35.mp4Sorry, I still not understand your problem, as you see on my video (It corrects):
|
Thanks for your double check (incl. video). The issue is |
On `platform` level, [should_auto_hide_scrollbars()](https://github.com/zed-industries/zed/blob/76a81607deec5b9093237cd3e98506dccc9f9565/crates/gpui/src/platform.rs#L205) might be `false` for some `platform`s, e.g. for `Linux`. That's why another check is needed to make scrollbars work properly on Linux. Fixes #685 --------- Co-authored-by: Jason Lee <[email protected]>
How to reproduce
cargo run --example list
.thumb
of the scrollbar to drag it. Or click thetrack
of the scrollbar. No scrolling - nothing happened.First investigation
Check
scrollbar.rs
->is_visible
is stillfalse
inpaint
(code), soMouseDownEvent
(code from here) can't be handled properly. That's becausedragged_axis
is stillNone
inis_scrollbar_visible
as long asScrollWheelEvent
is not fired once.Extra info
The text was updated successfully, but these errors were encountered: