-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
[BUG] MacOS: Mouse scrolling doesn't zoom #1414
Comments
Probably related to the general issues with #1354, i.e. something to do with the new multitouch support on macOS introduced in the latest major version of Flutter. For debugging purposes: what if you disable the pinch to zoom gesture? |
Even after disabling pinch to zoom gesture, it's still not working. |
(verified) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This needs to be re-evaluated. |
Tried to connect a mouse with a scroll wheel today on |
Unfortunately not, #1354 is still an issue :( |
Unfortunately, still it's an issue. |
I think you will need to provide a minimal reproducible code example then, so we can more easily debug/reproduce the issue. |
Here is the Minimal reproduce code
I can zoom perfectly with web version when I scroll over the map but when I do the same for macOS, it's not zooming in or out. |
Can you make it a complete example that actually runs? Then I can try again with that exact code. |
I've updated my last comment. (#1414 (comment)) |
That code also works for me with a mouse, using the scroll wheel to zoom in/out. Did you try running the example code you sent me as well (after the edit), just to see 100% that it's not something else related to your code. environment:
sdk: '>=3.0.0'
flutter: ">=3.10.0" flutter --version
Flutter 3.10.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d3d8effc68 (7 days ago) • 2023-05-16 17:59:05 -0700
Engine • revision b4fb11214d
Tools • Dart 3.0.1 • DevTools 2.23.1 MacOS: 13.4 This is my environment, what does yours look like? If you are behind on anything, could you try upgrading? EDIT: Also, are you using some particular mouse? Mouse settings? Could you another mouse? |
Can you verify in some way that you're depending on the 'master' branch? See https://stackoverflow.com/a/72446556/11846040. |
@rohanjariwala03 Can you try depending on 'master' instead? EDIT: @JosefWN Not sure how this would work on v4? I thought it is currently only fixed on master, but maybe it was fixed a while ago. |
Without a deeper knowledge of the mouse/touch code, I think the mouse events are different from the touch events, and could possibly have been working for quite a while? But yes, this is what I have in my pubspec.yaml when I'm testing: dependencies:
flutter_map: ^4.0.0
# ... flutter pub deps | grep flutter_map
├── flutter_map 4.0.0
Yes, I'm running the app native on MacOS. Seems to be some specific triggering factor. For the Magic Mouse specifically I don't know if the gesture register as mouse two-finger touch (which is pan), that could potentially be an issue? But it should really work with the Logitech mouse. @rohanjariwala03, what about your EDIT: If it matters, which would surprise me, I'm on an ARM-based (M1) Mac. |
I'm on the Mac M1 base as well. Don't know what's the potential issue with MacOs. Environment :
|
Okay, Thanks for help. I've tried with MacBook M2 chip and it's working. So, I think there is some settings issue with My MacMini. Appreciated. |
I figured the OS comes bundled with a set of drivers which might be slightly different from one version to another (especially major versions, if you are running a MacOS version below 13), and that there could be a potential issue/incompatibility in Flutter with a specific OS version. What if you bump to this? environment:
sdk: '>=3.0.0'
flutter: ">=3.10.0" I'm charging a Magic Mouse now to test with, will try in both release and debug with both mice. |
Ah, cool. Something that could help: Try re-installing Flutter so you have a fresh install. Rarely, during upgrades the install can get a bit borked for some reason, has happened to me once in 3-4 years, and I've seen others encounter odd issues which were helped by a re-install. |
Even though I'm using following environment, still that's an issue.
For your context, Magic Mouse still not work in MacOS for zoom in and out. But it work's with Web. |
Will try. Thanks |
Scrolling with the Magic Mouse in a native app seems to be interpreted as two-finger touch, which is pan. Not sure that we should do anything about this though, this is in line with native behavior (Apple Maps works the same way for example). Running on web it will probably work since the touch API:s seem to be less mature there, so the two-finger swipe translates into a scroll, which is interpreted as zoom in/out in Google Maps using Chrome for example. EDIT: So even though the behavior is inconsistent between web and native with the Magic Mouse in particular, that inconsistency is consistent and not Flutter-specific, if that makes any sense. |
What is the bug?
What is the expected behaviour?
How can we reproduce this issue?
Do you have a potential solution?
No response
Can you provide any other information?
Below video is of MacOs which have issue while scrolling
Screen.Recording.2022-12-06.at.3.02.21.PM.mov
Below Video is for Web where with the help of scrolling it's working
Screen.Recording.2022-12-06.at.3.05.38.PM.mov
Platforms Affected
MacOS
Severity
Minimum: Allows normal functioning
Frequency
Consistently: Always occurs at the same time and location
Requirements
flutter doctor
finds no relevant issuesThe text was updated successfully, but these errors were encountered: