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

Scroll predominant axis only (prevents scroll drift) #70047

Merged
merged 4 commits into from Feb 6, 2020

Conversation

@gubikmic
Copy link
Contributor

gubikmic commented Mar 8, 2019

This is a fix for #62003.
This fixes a UX problem that's easy to observe when using a trackpad, particularly on a MacBook:
It's almost impossible to scroll purely vertically, so on files with long lines a horizontal drift can occur which means the first few character columns might drift under the gutter even when the scroll intent was purely vertical.

This PR adds a boolean to the editor configuration (editor.scrollPredominantAxisOnly). When enabled it scrolls only the predominant axis. This prevents unintentional scroll drift, i.e. slightly diagonal scrolling when scrolling only one axis was intended.

Furthermore, I propose this to be the new default since for almost all software that presents text (or code) this is the standard behavior. The current behavior is standard only in graphic-centric applications where moving diagonally is intended more often.

@msftclas

This comment has been minimized.

Copy link

msftclas commented Mar 8, 2019

CLA assistant check
All CLA requirements met.

@gubikmic gubikmic force-pushed the gubikmic:scrollPredominantAxisOnly branch to 4f083a0 Mar 8, 2019
@alexdima alexdima added this to the April 2019 milestone Mar 27, 2019
@alexdima alexdima modified the milestones: April 2019, May 2019 May 8, 2019
@alexdima alexdima modified the milestones: May 2019, On Deck May 24, 2019
alexdima added 3 commits Sep 6, 2019
@alexdima alexdima modified the milestones: On Deck, February 2020 Feb 6, 2020
@alexdima

This comment has been minimized.

Copy link
Member

alexdima commented Feb 6, 2020

Thank you!

@alexdima alexdima merged commit 1bf0aea into microsoft:master Feb 6, 2020
1 of 5 checks passed
1 of 5 checks passed
linux linux
Details
windows windows
Details
darwin darwin
Details
VS Code queued
Details
license/cla All CLA requirements met.
Details
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.