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] Gestures apparently less responsive after long press #1695

Closed
Tracked by #1529
Henk-Keijzer opened this issue Oct 19, 2023 · 5 comments
Closed
Tracked by #1529

[BUG] Gestures apparently less responsive after long press #1695

Henk-Keijzer opened this issue Oct 19, 2023 · 5 comments
Assignees
Labels
bug This issue reports broken functionality or another error external The issue lies in a dependency or Flutter itself
Milestone

Comments

@Henk-Keijzer
Copy link

What is the bug?

clicks on the map work fine until a longpress on the map is triggered (and the function executed). After the longpress the map can still be moved around and zoomed in/out, but single clicks and longpresses do not result in the attached function to be called

How can we reproduce it?

set up map with both single click and longpress functions defined. After a single click, subsequent click work, but once you do a longpress, the single click and longpress no loinger work

Do you have a potential solution?

no

Platforms

windows 11

Severity

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

@Henk-Keijzer Henk-Keijzer added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Oct 19, 2023
@JaffaKetchup JaffaKetchup changed the title Map click unresponsive after long-press [BUG] Gestures apparently less responsive after long press Oct 20, 2023
@JaffaKetchup
Copy link
Member

Also see #1581, which details the particular issues that occur on the web (may be outdated).

@josxha
Copy link
Contributor

josxha commented Nov 2, 2023

Couldn't reproduce. Tested on Windows 11 and on Chrome on windows 11.

  • flutter 3.13.5
  • flutter_map 6.0.1
  • windows 11
  • chrome web browser
Aufzeichnung.2023-11-02.103750.mp4

@JaffaKetchup JaffaKetchup closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@JaffaKetchup JaffaKetchup added invalid This bug could not be reproduced or does not exist, or is very low quality and removed needs triage This new bug report needs reproducing and prioritizing labels Nov 2, 2023
@Henk-Keijzer
Copy link
Author

Henk-Keijzer commented Dec 5, 2023

The problem persist, but only in the following circumstances:

  • on web, Edge, Chrome etc.
  • when the onPressed calls launchUrl (with or without async/await)
onLongPress: (_, latlng) async {
  if (eventStatus == 'live' || eventStatus == 'pre-event') {
    await launchUrl(Uri.parse('https://embed.windy.com/embed2.html?lat=${latlng.latitude}&lon=${latlng.longitude}'
        '&detailLat=${latlng.latitude}&detailLon=${latlng.longitude}'
'&width=$screenWidth&height=$screenHeight&zoom=11&level=surface&overlay=wind&product=ecmwf&menu=&message=true&marker='
'&calendar=now&pressure=&type=map&location=coordinates&detail=true&metricWind=bft&metricTemp=%C2%B0C&radarRange=-1'));
  }
}

It works on web in Edge on Android, but the first interaction with the map after coming back to the browser window with the map is irresponsive.
It works fine on Android, iOS and on a Windows app.

Edit: did some more testing. Issue is resolved after opening a drop down list somewhere in a menu.... but then is back again. Very strange behaviour... See: https://tt.zeilvaartwarmond.nl/FTest/?event=Beurtveer/2024

@josxha josxha removed the invalid This bug could not be reproduced or does not exist, or is very low quality label Dec 5, 2023
@josxha
Copy link
Contributor

josxha commented Dec 5, 2023

Thanks for the additional information. I was able to reproduce it now.

@josxha josxha reopened this Dec 5, 2023
@josxha josxha added this to the v7.0 milestone Dec 5, 2023
@josxha josxha self-assigned this Dec 5, 2023
@josxha
Copy link
Contributor

josxha commented Dec 9, 2023

@Henk-Keijzer I'm closing this issue because this issue is a general flutter web issue.
I reported this issue to flutter in flutter/flutter#139862.

For context: the app fails to recognize the end of the long press gesture when a new tab get opened. After returning to the app. I think what happens is that the GestureRecognizer thinks the button is still pressed and doesn't listens to another key down event.

As a workaround you could open an AlertDialog that promts the user something like "Do you want to open windy for this location? yes / no" on a long press and then call launchUrl().

@josxha josxha closed this as completed Dec 9, 2023
@josxha josxha added the external The issue lies in a dependency or Flutter itself label Dec 9, 2023
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 external The issue lies in a dependency or Flutter itself
Projects
Archived in project
Development

No branches or pull requests

3 participants