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

fix(Mac): horizontal scrolling when shift key is held #689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KKishikawa
Copy link
Contributor

Fixes #686

Description

When scrolling vertically while holding down the Shift key, the vertical scroll volume was converted to a horizontal scroll volume.
Since this process is handled at a higher level on MacOS, I fixed the problem so that no re-conversion is done.

@KKishikawa KKishikawa force-pushed the fix/datagrid-scroll-shift-conv branch from e3c5b61 to 3c94bd4 Compare January 14, 2024 12:38
@ProjectInfinity
Copy link
Collaborator

Sorry this is a little delayed, I want to test it before merging and I need to do some setup first before I am able to test it on macOS. I have not forgotten about it!

@ProjectInfinity
Copy link
Collaborator

Hi, I finally had a macOS setup to test on. Whilst holding shift and scrolling down (without) this patch it worked like it should. Is the issue only related to mice? On touchpad it worked fine whilst using shift.

@KKishikawa
Copy link
Contributor Author

@ProjectInfinity
Thanks for the review.
Um, sorry, I'm not sure I understand what you're saying because I'm not very good at English.

The basis of this problem is to provide a way to scroll horizontally, since a typical mouse can only scroll vertically.
About the touchpad, Well, on a Mac, you can scroll horizontally by sliding two fingers sideways. So I don't think it's necessary to consider adding a way to scroll horizontally using the Shift key. What do you think about this?


I have created a simple REPL that can confirm the "swapping".
https://svelte.dev/repl/9032f26c6d1a4f7fab9f1d6e96416079?version=3.49.0

I tested mouse scrolling in a windows environment and a Mac environment.
The result was that the value of the wheel event was swapped only when the mouse scrolled while holding down the Shift key on the Mac.
I have also tried scrolling with a touchpad on a Mac, but the "swapping" does not seem to happen.


Windows 11 (23H2) Pro x64
Google Chrome 122.0.6261.71

mouse wheel
スクリーンショット 2024-02-29 164757

macOS Sonoma 14.3.1 (Apple M3 Pro)
Google Chrome 121.0.6167.184

mouse wheel
スクリーンショット 2024-02-29 16 10 31

touchpad (without shift key)

scroll_normal.mov

touchpad (with shift key)

scroll_shift.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Mac - Horizontal scrolling not working
3 participants