Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Horizontal scroll not working on Windows #225

Open
a-uz opened this issue Aug 29, 2021 · 20 comments · May be fixed by #230
Open

Horizontal scroll not working on Windows #225

a-uz opened this issue Aug 29, 2021 · 20 comments · May be fixed by #230

Comments

@a-uz
Copy link

a-uz commented Aug 29, 2021

It seems that pressing shift key while scrolling the mouse wheel has no effect on Windows, contents of the canvas move up or down, instead of left or right. On Mac it works as expected.

I was able to reproduce this with the latest versions of Chrome and Edge on Windows 10.

@Andarist
Copy link
Member

Thank you for the report. I've opened a draft PR with the fix here: #230

@a-uz
Copy link
Author

a-uz commented Aug 30, 2021

Just tried the fix and it works great!

@Andarist
Copy link
Member

@a-uz could you confirm that you are using an actual mouse? I have some doubts about this fix: #230 (comment)

@a-uz
Copy link
Author

a-uz commented Aug 31, 2021

@Andarist Yes, I'm using an actual mouse.

I did some more testing and with the current production version on Windows trackpad interactions work just fine, but shift key + mouse wheel doesn't. With the PR version shift key + mouse wheel works, but shift key + trackpad is now strange: I can only drag up and down to pan left or right and there's no way to pan up or down. TBH, I'm not even sure how it should be.

@a-uz
Copy link
Author

a-uz commented Aug 31, 2021

I tried to use shift key + trackpad on Figma and Draw.io. On Figma's canvas holding shift key and dragging up or down pans left or right, dragging left or right pans up or down. On Draw.io's canvas holding shift key and dragging in all directions pans left or right.

@Andarist
Copy link
Member

@a-uz I've pushed out some changes, could you give this a spin? I would also appreciate it if you could rephrase your Figma & Draw.io research because I'm unsure if I got this right. Mentioning the exact combination of shift, wheel/trackpad, physical direction and the resulting pan direction for all of those cases would help me a lot.

@a-uz
Copy link
Author

a-uz commented Aug 31, 2021

@Andarist Now the mouse + shift key combo doesn't work anymore and trackpad + shift key works the same as without the shift key.

Dragging on Figma's canvas with trackpad + shift key inverts the direction: dragging vertically pans horizontally and dragging horizontally pans vertically. Dragging on Draw.io's canvas with trackpad + shift key pans horizontally regardless of drag direction.

I guess I would prefer the visualizer to have Figma's approach by inverting the direction when shift key is pressed.

@Andarist
Copy link
Member

Ok, thank you for your feedback - gonna take another look at this tomorrow. I'm a little bit surprised though that shift+mouse doesn't work - maybe some kind of a silly mistake in the adjustments I've made.

@senritsu
Copy link

Not sure if this is related (or even a feature at the moment), but dragging to scroll (with middle mouse held) does nothing on windows/chrome as well. With mouse there seems no way to pan around. I tried a variety of mouse buttons and modifier keys without success. Fortunately using a touchpad with multitouch works fine, and I do have one available.

@Andarist
Copy link
Member

dragging to scroll (with middle mouse held) does nothing on windows/chrome as well.

Could you describe in more detail what dragging to scroll means in this context?

With mouse there seems no way to pan around. I tried a variety of mouse buttons and modifier keys without success

You should be able to hold Space key and then drag around the canvas with your left mouse button.

@a-uz
Copy link
Author

a-uz commented Sep 13, 2021

Functionality wise pressing mouse wheel and dragging == holding Space and dragging. Usability wise it doesn't require a keyboard.

@Andarist
Copy link
Member

Ok, I see - expect a PR fixing that tomorrow 😉

@senritsu
Copy link

senritsu commented Sep 13, 2021

Space+Mouse does indeed work, and like @a-uz said, it would be quite convenient if middle-mouse-drag had the same behavior as well.

Thanks for the quick response that even made it in time for a meeting 😁

@Andarist
Copy link
Member

I don't quite have access to a mouse with a middle button - could you check if this works correctly for you: https://xstate-viz-git-andarist-wheel-panning-statelyai.vercel.app/viz ?

@a-uz
Copy link
Author

a-uz commented Sep 15, 2021

It doesn't seem to work correctly. Here's a short video:

Kapture.2021-09-15.at.16.07.44.mp4

@Andarist
Copy link
Member

Would you be able to record a replay using https://www.replay.io/ ? That is an amazing product that has just shipped today and would allow me to debug everything that happens during your session. Please only remember to log out before starting to record because this actually records everything.

@a-uz
Copy link
Author

a-uz commented Sep 16, 2021

I already tried that, but there seems to be a bug with the recorder itself https://app.replay.io/recording/5362dc4e-23b1-47de-88c0-ffb7756b98d9

@Andarist
Copy link
Member

@a-uz thanks for the attempt to record this. I've filed an issue in Replay here: https://github.com/RecordReplay/devtools/issues/3626 . If you have any additional context that you could share there it would be awesome.

As to the issue here - I will try to simulate this on my own to see if I can quickly find anything that is obviously broken.

@Andarist
Copy link
Member

@a-uz sorry for the late reply, time flies and I've been working on something else. I have not forgotten about this though! Could you re-check with the mentioned preview deployment? I believe that I've fixed the issues with my previous quick implementation and I've actually tested this more thoroughly this time.

@a-uz
Copy link
Author

a-uz commented Oct 20, 2021

@Andarist Works great! Thank you for all the effort, I really appreciate it!

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 a pull request may close this issue.

3 participants