Skip to content

Conversation

@towerofnix
Copy link
Contributor

Resolves

Fixes #1662.

Proposed Changes

Copied from scratchfoundation/scratch-paint#263:

This is a "workaround" for browsers which do not automatically set deltaX when the shift key is held (seen on Firefox-Linux and Chrome-Windows, but not Chrome-Mac). This PR makes it so that when the shift key is held while scrolling, deltaX is ignored, and the distance scrolled horizontally is set to deltaY.

Reason for Changes

Support for horizontal scrolling with the scroll wheel by holding shift on Firefox.

Test Coverage

Tested locally on Firefox/Linux. Functionally-identical code reviewed and tweaked in discussion with @fsih in the above scratch-paint PR.

Copy link
Contributor

@kchadha kchadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good, @fsih, do you mind testing the before/after of this on Windows firefox?

@fsih
Copy link
Contributor

fsih commented Aug 13, 2018

Tested Chrome, Firefox, and Edge on Windows; none were working before, but all are horizontal scrolling with shift key pressed now!

@fsih fsih merged commit 731ab04 into scratchfoundation:develop Aug 13, 2018
@towerofnix towerofnix deleted the shift-scroll-firefox branch August 13, 2018 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants