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

Map bug when attempting to pan the map while pressing on a report pin #4132

Closed
jonkri opened this issue Oct 11, 2022 · 5 comments
Closed

Map bug when attempting to pan the map while pressing on a report pin #4132

jonkri opened this issue Oct 11, 2022 · 5 comments

Comments

@jonkri
Copy link
Contributor

jonkri commented Oct 11, 2022

Describe the bug

The map can enter a state where:

  • Panning touch movements (not pinch/zoom movements) can result in the map being zoomed in our out.
  • Existing reports can no longer be opened. (Instead, FixMyStreet offers to create a new report when touching a pin.)

To Reproduce

Steps to reproduce the behavior:

  1. Search for a location where there are map pins
  2. Touch a pin and immediately (while pressing down on the pin) pan the map
  3. A preview of the report shows up
  4. The map may now (it doesn't always happen) have entered the state described above

Expected behavior

The map should continue to work like it did before opening the report preview. Panning movements should pan the map (not zoom it). Additionally, touching existing map pins should show a preview of the report in question (as opposed to offer to create a new report).

Screenshots

Here's a video:

https://fixamingata.se/static/fixmystreet-map-problem.webm

Please not that only panning movements (no pinch movements) were performed after the report preview was opened. Despite this, the map is zoomed in an odd way.

Smartphone (please complete the following information):

  • Device/OS: Emulated Pixel 3a
  • OS: Android, API 32
  • Browser: Chrome
  • Version: 91.0.4472.114
@jonkri
Copy link
Contributor Author

jonkri commented Jan 4, 2023

Here's a video showing the problem on a physical Android device:

https://fixamingata.se/static/fixmystreet-map-problem.mp4

The user who sent this video to us said he experiences this issue everytime he uses the map. (That was prior to the changes in #4220 which, while not solving the problem completely, appears to have helped.)

@dracos
Copy link
Member

dracos commented Feb 7, 2023

Sorry to hear this. I'm not sure what could be causing it, and haven't had any other complaints come in. I assume it's some sort of race condition or conflict in terms of the touch events being sent by the browser. I don't see how it would get in a zoom-instead-of-pan state if the browser is sending the right events. I can't reproduce it here, but someone would have to trace what's happening when it does happen in terms of which events are fired, which code paths are run, and so on.

@dracos
Copy link
Member

dracos commented Feb 7, 2023

Actually of course now saying that I did manage to have it happen to me too. Wonder what it could be.

@dracos
Copy link
Member

dracos commented Feb 8, 2023

I guess a good start might be to add a new Cypress test that exhibited the problem, if that's possible, so it's then reproducible. But would probably need to know how it was done in order to do that...

@dracos
Copy link
Member

dracos commented Apr 20, 2023

Hi, we think we've finally tracked this down and is hopefully fixed by the changes we've made to OpenLayers in mysociety/ol2#1 - included in FMS repo in #4395 - it was indeed some weird touch event conflict issue.

@dracos dracos closed this as completed Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants