dream-num / univer

Univer is an isomorphic full-stack framework for creating and editing spreadsheets, docs, and slides across client and server.
https://univer.ai
Apache License 2.0
7.53k stars 654 forks source link

[Bug] Horizontal scroll broken after upgrade to 0.5.0 #4167

Closed vimcaw closed 3 days ago

vimcaw commented 6 days ago

Before you submit this issue, have you checked the following

Affected packages and versions

0.5.0

Reproduction link

https://stackblitz.com/~/github.com/vimcaw/sheets-vite-demo

The reproduction was cloned form official template and without any changes except upgrading to 0.5.0.

Expected behavior

When I press and hold the shift key then make a mouse wheeling, it should scroll horizontally.

Actual behavior

Nothing happen, it works on 0.4.2, but become broken after upgrading to 0.5.0.

System information

System: OS: macOS 14.5 CPU: (8) arm64 Apple M2 Memory: 141.11 MB / 16.00 GB Shell: 3.6.1 - /opt/homebrew/bin/fish Binaries: Node: 23.2.0 - /opt/homebrew/bin/node Yarn: 1.22.22 - /opt/homebrew/bin/yarn npm: 10.9.0 - /opt/homebrew/bin/npm pnpm: 8.15.9 - /opt/homebrew/opt/pnpm@8/bin/pnpm Browsers: Chrome: 131.0.6778.86 Safari: 17.5

jikkai commented 4 days ago

We are unable to reproduce the issue you mentioned, please provide the minimum reproduction.

vimcaw commented 4 days ago

We are unable to reproduce the issue you mentioned, please provide the minimum reproduction.

Do you team have a mac? It's 100% reproducible to me (using mac) in the reproduction link.

vimcaw commented 4 days ago

Btw, some third-party software (to me it's the Mac Mouse Fix) is required under mac to make shift + wheel = horizontal scrolling, which is what everyone does

jikkai commented 4 days ago

We have tested this on all major platforms, including macOS, but we were unable to reproduce the issue you described. We tested the native Shift + Mouse Wheel horizontal scrolling functionality, as well as using the Magic Trackpad, and found no abnormalities.

Since you mentioned that you are using Mac Mouse Fix, we recommend first checking for potential interference from third-party software or testing on a macOS device without such software installed.

If the issue can still be reproduced, please provide us with more detailed information (e.g., videos or screenshots) so that we can analyze and address the problem more thoroughly.

vimcaw commented 4 days ago

We have tested this on all major platforms, including macOS, but we were unable to reproduce the issue you described. We tested the native Shift + Mouse Wheel horizontal scrolling functionality, as well as using the Magic Trackpad, and found no abnormalities.

Since you mentioned that you are using Mac Mouse Fix, we recommend first checking for potential interference from third-party software or testing on a macOS device without such software installed.

If the issue can still be reproduced, please provide us with more detailed information (e.g., videos or screenshots) so that we can analyze and address the problem more thoroughly.

Thanks to your dedication and responsible attitude, after testing two apps (Mac Mouse Fix and Better Mouse), I found the reason, as long as "smooth scrolling" on those app is turned off, horizontal scrolling works normally.

Since the under hood of smooth scrolling is to trigger a series of very small scrolling delta, I think it should be that some delta threshold checking for horizontal scrolling was added in version 0.5.0, which caused the smooth scrolling to be smaller than the threshold and discarded.

jikkai commented 3 days ago

This issue may be fixed in #4156, which will be included in the next release. Please check if the problem persists after updating. Feel free to reopen this issue if needed.

vimcaw commented 2 days ago

This issue may be fixed in #4156, which will be included in the next release. Please check if the problem persists after updating. Feel free to reopen this issue if needed.

I have confirmed that it is fixed at 0.5.1, thanks!