Scrolling zoom is reversed if image viewer doesn't have focus#61222
Merged
mjbvz merged 1 commit intomicrosoft:masterfrom Oct 22, 2018
balent:image-wheel-zoom
Merged
Scrolling zoom is reversed if image viewer doesn't have focus#61222mjbvz merged 1 commit intomicrosoft:masterfrom balent:image-wheel-zoom
mjbvz merged 1 commit intomicrosoft:masterfrom
balent:image-wheel-zoom
Conversation
Collaborator
|
Thanks! |
Closed
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.
Steps to reproduce:
Issue is that when Ctrl is pressed and image viewer doesn't have focus, then "keydown" event is never received and "ctrlPressed" variable is never set to true.
However when "wheel" event is received, code checks for e.ctrlKey to detect pinching. Then pinching is incorrectly detected and on the line 522 the zoom direction is reversed.
In this solution I'm registering listeners globally so Ctrl event is received even when the image viewer doesn't have focus.
fixes partially #55470 - now scrolling will be consistent.