noah-nuebling / mac-mouse-fix

Mac Mouse Fix - Make Your $10 Mouse Better Than an Apple Trackpad!
https://macmousefix.com/
Other
5.62k stars 157 forks source link

Horizontal scrolling with smooth scrolling enabled invokes browser tab history navigation [bug] #372

Open jaekyeom opened 2 years ago

jaekyeom commented 2 years ago

Description

Hi,

I'm trying out 3.0.0 Beta 1 (18408) (from https://github.com/noah-nuebling/mac-mouse-fix/issues/369#issuecomment-1246129702).

Steps to reproduce

  1. Open Google Chrome
  2. Open a Google Spreadsheet page
  3. Make sure that there is the horizontal scroll bar in the Google Spreadsheet page
  4. Enable "Smooth Scrolling" and "Scroll Horizontally" in MMF
  5. In the Google Spreadsheet page, make some navigation history (e.g., by creating new sheets, switching between sheets, ...)
  6. Try scrolling horizontally

What I expect here is just scrolling horizontally, but it invokes "Go back" and "Go forward" in that tab.

Context

Mac Mouse Fix Version: 3.0.0 Beta 1 macOS Version: 12.0.1 (21A559) Mouse Model: –

Additional Comments


Console Logs

Crash Reports

noah-nuebling commented 2 years ago

Hey @jaekyeom, thanks for your feedback!

The horizontal scrolling should work just like swiping sideways with 2 fingers on an Apple Trackpad, so I expect that this is a Google Chrome / Google Spreadsheets bug that also occurs on a trackpad. Does that match your observations?

As for solutions I don't have great ones as of now. The only ones I can think of are:

Hope to provide a better solution at some point but not sure how.

You may also want to file a bug report with Google Chrome or Google Spreadsheets.

Hope that helps a little! Let me know if you have more questions.

jaekyeom commented 2 years ago

@noah-nuebling Thanks for the reply!

I've just tested the same actions with both MMF and (Apple's) trackpad, and it looks that the issue does not occur with trackpad.

https://user-images.githubusercontent.com/6262727/190170010-e4cb9dca-1f74-41ce-b0e9-0d023934a097.mov

noah-nuebling commented 2 years ago

@jaekyeom thanks for getting back! I tested the same thing you recorded on my M1 machine under the Ventura Beta using Chrome 104.0.5112.79 and I can't reproduce the problem.

I'll try to test later under Monterey with an Intel Chip.

Which Chrome version are you using?

The only thing I can come up with right now is that your Chrome might react weirdly to you holding a modifer key or something. To test this you could see if the same thing happens when scroll horizontally using the Click and Drag to "Scroll & Navigate" feature.

noah-nuebling commented 2 years ago

Another possibility is that maybe some other mouse software is interfering, do you have anything else running?

jaekyeom commented 2 years ago

Thanks, here are the results!

Which Chrome version are you using?

It's 105.0.5195.102 (Official Build) (x86_64).

The only thing I can come up with right now is that your Chrome might react weirdly to you holding a modifer key or something. To test this you could see if the same thing happens when scroll horizontally using the Click and Drag to "Scroll & Navigate" feature.

I tested, and the same thing happens, indeed.

Another possibility is that maybe some other mouse software is interfering, do you have anything else running?

I don't think so...? Also, I already had disabled the previous version of MMF.

noah-nuebling commented 2 years ago

Thanks for getting back! I can actually reproduce your issue now on my Intel Mac using macOS 12. But on my M1 running Ventura it works fine.

I spent some time investigating the issue but I haven’t figured out what causes it yet. I definitely plan to spend more time on it before release though as it’s really very annoying.

noah-nuebling commented 2 years ago

Okay I investigated this some more. It's unfortunately a Chromium bug that also occurs with the Apple Magic Mouse.

The bug is tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=252895

The scroll events that Mac Mouse Fix sends are really close to the events that the Magic Mouse sends. I also spent a few hours staring at disassembly of Apple code to figure out how to make the Mac Mouse Fix events look exactly like Trackpad events, but it seems to be nearly impossible. I didn't feel too bad though because that always makes me feel like a cool hacker man.

I think the best and easiest way to solve this is to fix the bug in Chromium.

I also tried building Chromium from source today to see if I can help figuring the bug out but I haven't had any luck with that so far.

If you go the Chromium Bug tracker (linked above) and Star the bug or write a comment that might help get the devs to prioritize it more.

jaekyeom commented 2 years ago

Wow, that must have been a tough journey.

Thanks for the thorough investigation and tries! I'll keep my eyes on that crbug.

noah-nuebling commented 1 year ago

Hi @jaekyeom, in the latest 3.0.0 Beta 6 you can now turn off the browser navigation behaviour by disabling the "Trackpad Simulation" option.

Hope that helps a little!