Leaflet: Interactions broken on "device emulation mode" on Chrome, Firefox

Created on 13 May 2015  路  6Comments  路  Source: Leaflet/Leaflet

How to reproduce:

  • Open up http://leafletjs.com/examples/mobile-example.html in a Chrome browser on a desktop computer
  • Hit F12, then turn on "device emulation mode" (the small smartphone button top-left in the debug console)
  • Select any device to emulate (somehow the bug doesn't reproduce when clearing all the emulation overrides)
  • Refresh the page
  • Try to interact with the map by dragging

Reproducible at least on my:

  • Chromium 42 on Debian 8
  • Chrome 42 on a Win10 VM
  • Iceweasel 35 on Debian 8

Not reproducible on:

  • IE 11 on Win10 VM
  • Firefox 38 on Win10 VM

I also noticed it in Chrome on Android 5 on an HTC, but as a non-reproducible heisenbug.

I suspect some kind of weird behaviour related to the geolocation code. Somehow the bug doesn't reproduce when accessing the page from localhost, or when allowing/blocking geolocation, but I'm not fully sure yet.

I can only reproduce with 0.7.3/stable. Code from master works as expected on debug/map/map-mobile.html.

bug

Most helpful comment

@mourner I can't find the official resolution to this. I am having the same issue on my own app which has a lot of scroll and move events.

All 6 comments

This is a duplicate of #1890, but I'll close the other one as this issue is more descriptive.

Note that the duplicate (and closed) issue #3519 provides a workaround.

Pull #3520 should fix this. @oallouch, I didn't notice the root of the problem was at L.Browser.touch, nice catch!

Cool, merged!

@mourner I can't find the official resolution to this. I am having the same issue on my own app which has a lot of scroll and move events.

My impression is that this issue has resurfaced in 1.6.0.
Just try using the Chrome emulator on the main page example.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

walterfn2 picture walterfn2  路  4Comments

ttback picture ttback  路  4Comments

timwis picture timwis  路  3Comments

brambow picture brambow  路  3Comments

CallMarl picture CallMarl  路  3Comments