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

[BUG] MacOS: Cannot scroll with trackpad inside scrollable if InteractiveFlag.drag enabled #1395

Open
5 tasks done
Tracked by #1529
AndreiMisiukevich opened this issue Oct 31, 2022 · 15 comments
Open
5 tasks done
Tracked by #1529
Labels
bug This issue reports broken functionality or another error P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Milestone

Comments

@AndreiMisiukevich
Copy link

What is the bug?

If I put FlutterMap inside ScrollView (e.g. SingleChildScrollView with a Column of several elements) I cannot scroll the scroll view with the trackpad if the mouse pointer is hovering over the map.

I added enableScrollWheel: false, but it didn't help (Honestly, I see any difference with or without this property)
I found, that this happens only if interactiveFlags contains InteractiveFlag.drag element, otherwise scroll with the trackpad works fine.

What is the expected behaviour?

It should be possible to scroll the scrollview when hovering FlutterMap on macOS if enableScrollWheel: false, passed

How can we reproduce this issue?

return SingleChildScrollView(
            child: Column(children: [
              SizedBox(
                height: 224,
                child: FlutterMap(
                  options: MapOptions(
                    interactiveFlags: InteractiveFlag.drag | InteractiveFlag.doubleTapZoom,
                  ),
                  children: [
                    TileLayer(
                      // Free OSM
                      urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
                      subdomains: const ['a', 'b', 'c'],
                    ),
                  ],
                ),
              ),
              const SizedBox(height: 2000),
            ]),
          );

Do you have a potential solution?

No :(
For some reason, it works fine on the Web

Can you provide any other information?

Oct-31-2022 03-22-34

Platforms Affected

MacOS

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

Frequency

Consistently: Always occurs at the same time and location

Requirements

  • I agree to follow this project's Code of Conduct
  • My Flutter/Dart installation is unaltered, and flutter doctor finds no relevant issues
  • I am using the latest stable version of this package
  • I have checked the FAQs section on the documentation website
  • I have checked for similar issues which may be duplicates
@AndreiMisiukevich AndreiMisiukevich added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Oct 31, 2022
@JaffaKetchup
Copy link
Member

Hi @AndreiMisiukevich!
Unfortunately, I think MacOS gesture handling has been undergoing some changes in Flutter recently. Maybe similar/related to #1354?

@AndreiMisiukevich
Copy link
Author

Hi @AndreiMisiukevich! Unfortunately, I think MacOS gesture handling has been undergoing some changes in Flutter recently. Maybe similar/related to #1354?

Thanks for your response.
Maybe by chance, you know how to work around it? I need somehow make FlutterMap ignore wheel scroll gestures.
Also, if I don't pass InteractiveFlag.drag it works fine as well

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Nov 1, 2022

Unfortunately not. Slightly strange that disabling enableScrollWheel doesn't work, and not quite sure what you mean by...

if I don't pass InteractiveFlag.drag it works fine as well

What does 'works fine' mean?

EDIT: This line:

interactiveFlags: InteractiveFlag.drag | InteractiveFlag.doubleTapZoom,

may not work as you expect? But to be honest I can't be sure. What happens if you use '&' instead?

@AndreiMisiukevich
Copy link
Author

may not work as you expect? But to be honest I can't be sure. What happens if you use '&' instead?
In this case, I cannot drag the map.

What does 'works fine' mean?
I mean, that I can scroll by trackpad in this case, but dragging does not work.

So, if dragging is disabled, then I can scroll by trackpad, but if it's enabled, then I can't

@JaffaKetchup
Copy link
Member

Hmm, that is quite strange. I'm not sure what we can do, but I'll leave this open for now :)

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

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.

@github-actions github-actions bot added the Stale label Dec 2, 2022
@AndreiMisiukevich
Copy link
Author

I believe this is still the issue :)

@JaffaKetchup JaffaKetchup removed the Stale label Dec 2, 2022
@JaffaKetchup JaffaKetchup added non-fatal and removed needs triage This new bug report needs reproducing and prioritizing labels Dec 20, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Jan 20, 2023
@AndreiMisiukevich
Copy link
Author

I believe this is still the issue :)

@JaffaKetchup JaffaKetchup changed the title [BUG] macOS: Cannot scroll with trackpad inside Scroll View if InteractiveFlag.drag enabled [BUG] MacOS: Cannot scroll with trackpad inside scrollable if InteractiveFlag.drag enabled May 20, 2023
@JaffaKetchup
Copy link
Member

Hey @AndreiMisiukevich, when you get a moment, can you re-evaluate whether this issue is still applicable in the 'master' branch with the latest Flutter 3.10 version?
Thanks!

@AndreiMisiukevich
Copy link
Author

@JaffaKetchup hey
I think I can still reproduce it

@JaffaKetchup JaffaKetchup added P: 3 (low) (Default priority for feature requests) and removed non-fatal labels Jun 19, 2023
@AndreiMisiukevich
Copy link
Author

Looks like absorbPanEventsOnScrollables: false, does the trick

@JaffaKetchup
Copy link
Member

That's interesting, thanks for sharing. Unfortunately that option isn't available in the latest FM versions, so I'm going to reopen this.

@JaffaKetchup JaffaKetchup reopened this Oct 31, 2023
@josxha josxha added this to the v7.0 milestone Dec 2, 2023
@JaffaKetchup JaffaKetchup added the S: core Scoped to the core flutter_map functionality label Dec 10, 2023
@ndonkoHenri

This comment was marked as outdated.

@ndonkoHenri

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Projects
Status: To do
Development

No branches or pull requests

4 participants