Skip to content
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

Slowly scrolling tabs bar with trackpad jittering #188160

Closed
brandonmcconnell opened this issue Jul 18, 2023 · 2 comments
Closed

Slowly scrolling tabs bar with trackpad jittering #188160

brandonmcconnell opened this issue Jul 18, 2023 · 2 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member help wanted Issues identified as good community contribution opportunities trackpad/scroll Trackpad device issues verified Verification succeeded workbench-tabs VS Code editor tab issues
Milestone

Comments

@brandonmcconnell
Copy link

Screen recording:

Screen.Recording.2023-07-18.at.7.06.40.AM.mov

This occurs when using either the external or built-in trackpad. There are no other input devices connected and in use when this occurs.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-tabs VS Code editor tab issues confirmed Issue has been confirmed by VS Code Team member regression Something that used to work is now broken labels Jul 21, 2023
@bpasero bpasero added this to the July 2023 milestone Jul 21, 2023
@bpasero
Copy link
Member

bpasero commented Jul 21, 2023

This is not a regression and seems to reproduce for a very long time. If someone has a clue and wants to investigate, we apply the scroll state here to the tabs:

tabsScrollbar.onScroll(e => {
if (e.scrollLeftChanged) {
scrollable.scrollLeft = e.scrollLeft;
}
});

I feel the issue comes from our custom scrollable implementation, but cannot pin point it yet.

@bpasero bpasero added help wanted Issues identified as good community contribution opportunities trackpad/scroll Trackpad device issues and removed regression Something that used to work is now broken labels Jul 21, 2023
@bpasero bpasero removed this from the July 2023 milestone Jul 25, 2023
@bpasero
Copy link
Member

bpasero commented Jul 27, 2023

I went deep into debugging this and feel this case cannot be fixed but maybe improved (in #189034). The tabs control scrollbar is configured in a way that both scrolling vertically and horizontally is allowed, scrolling horizontally. When using the trackpad I see myself often getting into a state where I end up scrolling both vertically and horizontally when scrolling slowly.

We do have logic to prefer the scroll direction with larger value, but in some cases the values are identical and as such compete. Today we pick one of the values but I think for the tabs stripe it would be better to ignore the scroll in such case.

if (this._options.scrollPredominantAxis) {
if (Math.abs(deltaY) >= Math.abs(deltaX)) {
deltaX = 0;
} else {
deltaY = 0;
}
}

This would not fix stutter when slowly scrolling but I see it preventing weird direction turns of the stripe when scrolling slowly.

tl;dr; idea would be to ignore scroll events for scrollbars that map y to x where we see competing directions that would equal each other out.

@bpasero bpasero added this to the August 2023 milestone Jul 28, 2023
@bpasero bpasero closed this as completed Jul 28, 2023
@bpasero bpasero added the author-verification-requested Issues potentially verifiable by issue author label Aug 22, 2023
@lramos15 lramos15 added the verified Verification succeeded label Aug 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member help wanted Issues identified as good community contribution opportunities trackpad/scroll Trackpad device issues verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

3 participants