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

NogoAreas control doesn't work on mobile Chrome #259

Closed
YaroShkvorets opened this issue Nov 15, 2019 · 2 comments
Closed

NogoAreas control doesn't work on mobile Chrome #259

YaroShkvorets opened this issue Nov 15, 2019 · 2 comments
Labels
Milestone

Comments

@YaroShkvorets
Copy link

Can't draw the circle.
Android.
Works fine on mobile Firefox though.

@nrenner
Copy link
Owner

nrenner commented Nov 16, 2019

Thanks for reporting.

Can reproduce in the mobile view of Chrome Desktop, dragging is moving the map instead of drawing a circle.

@nrenner nrenner added the bug label Dec 3, 2019
@nrenner nrenner closed this as completed in 32d4a26 Jun 5, 2020
@nrenner
Copy link
Owner

nrenner commented Jun 5, 2020

Nogo drawing doesn't work on mobile Chrome because Leaflet.Editable relies on L.Map.Tap handler for touch support (see also Leaflet.Editable#108), but that handler is not added in browsers that support Pointer events like mobile Chrome (mobile Firefox doesn't).

It does work in current version 0.11.1 however, as Leaflet 1.6.0 has a bug that disables the pointer flag for all Webkit browsers (instead of just Safari) and therefore enables the Tap handler for Chrome also, which is already fixed in master though, see Leaflet#6977.

The workaround is to add the Tap handler ourselves where needed and to only enable it for circle drawing.

@nrenner nrenner added this to the 0.12.0 milestone Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants