manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
463 stars 85 forks source link

autoPreventDefault=true stops click events on iOS Safari #56

Open dnasir opened 3 years ago

dnasir commented 3 years ago

The autoPreventDefault option allows me to stop the Safari browser from triggering the accessibility zoom when the user uses pinch to zoom on iOS. Unfortunately, it also prevents any click events from being fired.

See the example below on a regular desktop, and then on any browser on any iOS device (since they all run WebKit anyway). You will find that the click event handler gets triggered on non-iOS devices, but not on iOS. However, this phenomenon does not occur on the desktop version of Safari on my Mac.

https://jsfiddle.net/dzul1983/dy6wro9L/2/show

I don't know if this is a bug with the plugin, or with pixi.js, but since I first encountered it while using this plugin, I thought I'd post this here first.

Let me know if you need more information.