Scroll predominant axis only (prevents scroll drift)#70047
Merged
alexdima merged 4 commits intomicrosoft:masterfrom Feb 6, 2020
Merged
Scroll predominant axis only (prevents scroll drift)#70047alexdima merged 4 commits intomicrosoft:masterfrom
alexdima merged 4 commits intomicrosoft:masterfrom
Conversation
74568c0 to
4f083a0
Compare
Member
|
Thank you! |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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.