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

Panning during pinch zoom gestures on Android Devices since version 1.4.0 #8889

Closed
dev-guf opened this issue Oct 23, 2019 · 7 comments
Closed

Comments

@dev-guf
Copy link

dev-guf commented Oct 23, 2019

mapbox-gl-js version:
v.1.4.0 and newer
browser:
Android Chrome v. 78

Steps to Trigger Behavior

  1. Open Demo Page (v.1.4.0) in Android Chrome
  2. Quickly zoom in and out with "pinch gestures"
  3. Map moves away randomly

Link to Demonstration

BUG in v.1.4.0
https://storage.googleapis.com/my-test-env/mapbox.1.4.0.html

OK in v.1.3.2
https://storage.googleapis.com/my-test-env/mapbox.1.3.2.html

Expected Behavior

No move during zooming

Actual Behavior

Randomly moves the map while zooming with two fingers

@kkaefer
Copy link
Member

kkaefer commented Oct 23, 2019

Linking #8100, which might have introduced this regression.

@vakila
Copy link

vakila commented Oct 23, 2019

Thanks for the thorough report & demo pages @igu-tech !

So far I'm not really able to reproduce the issue with the map "moving away randomly" (on Android Chrome & Firefox on Samsung smartphone). I do notice some slight wandering as a I zoom in and out (because the center of my fingers/the map is gradually moving, and it's expected behavior that the map center will move to match the users' gesture, so that the user can pan and zoom the map at the same time), but that doesn't seem to match the behavior you're reporting.

I do, however, notice my 2-finger touch occasionally being perceived as a 1-finger touch by the map which pans rather than zooms as a result (similar to #8375), so I wonder if that could have something to do with what you're seeing. Possibly in combination with another small bug we're aware of where the map jumps from one finger to another in certain transitions from 2 fingers to 1, I could imagine that jump being a possible culprit for what seems like a "random" move.

In any case we'll investigate further and see what we can reproduce on other Android device(s). @igu-tech Do you notice this behavior when you have both fingers still firmly touching the screen? Or just as you're lifting your fingers? or both?

cc @arindam1993

@dev-guf
Copy link
Author

dev-guf commented Oct 24, 2019

@vakila
When i have both fingers firmly touching the screen it works - but when i quickly zoom in and out i can not guarantee that both fingers stay on then touch screen simultaneously (see example).

@vakila
Copy link

vakila commented Oct 24, 2019

@igu-tech Great, thanks for the clarification and the video - this seems to support my hunch that the culprit is interaction between two-finger-zooming and single-finger dragging. I'll look into reproducing what you experience in the video and see if we can find a way to mitigate that.

@ansis
Copy link
Contributor

ansis commented Apr 7, 2020

@igu-tech I think this has been fixed by #9365. If you have a chance to test and confirm, that would be great! The fix is in master and will be released in a beta release tomorrow.

@dev-guf
Copy link
Author

dev-guf commented Apr 14, 2020

@ansis
I just tried v1.10.0-beta.1 and it works as expected.
Great Work!

@ansis
Copy link
Contributor

ansis commented Apr 14, 2020

Thanks for testing!

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

No branches or pull requests

4 participants