Skip to content

Scroll predominant axis only (prevents scroll drift)#70047

Merged
alexdima merged 4 commits intomicrosoft:masterfrom
gubikmic:scrollPredominantAxisOnly
Feb 6, 2020
Merged

Scroll predominant axis only (prevents scroll drift)#70047
alexdima merged 4 commits intomicrosoft:masterfrom
gubikmic:scrollPredominantAxisOnly

Conversation

@gubikmic
Copy link
Copy Markdown
Contributor

@gubikmic 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
Copy link
Copy Markdown

msftclas commented Mar 8, 2019

CLA assistant check
All CLA requirements met.

@gubikmic gubikmic force-pushed the scrollPredominantAxisOnly branch from 74568c0 to 4f083a0 Compare March 8, 2019 12:20
@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 alexdima modified the milestones: On Deck, February 2020 Feb 6, 2020
@alexdima
Copy link
Copy Markdown
Member

alexdima commented Feb 6, 2020

Thank you!

@alexdima alexdima merged commit 1bf0aea into microsoft:master Feb 6, 2020
@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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants