aratcliffe/Leaflet.contextmenu

Context Menu shows on top left in Chrome Developer mode

itnmunoz opened this issue · 4 comments

To reproduce:

  1. Open Chrome in developer mode (with developers tools panel showing),
  2. Load the url http://aratcliffe.github.io/Leaflet.contextmenu/examples/index.html
  3. Now, on right clicking the map, contextmenu shows on top left corner.

(If you first load the example, and then open the developers tools you do not get this behaviour, but on reloading the page you do)

Seems to be something with Chrome, but not sure. This issue makes difficult to test code with Chrome, because events are messed.

I'm sorry but I can't reproduce this on Chrome Mac Version 60.0.3112.113. Can you try disabling any browser extensions and trying again.

I've realized that this happens in responsive design, when simulating a mobile device (toggle device mode).

I've tried it in some other computers and the same happens, also with Chromium. This seems to be something with the Chrome family browsers, Firefox works fine.

Doesn't sound like something to be fixed in this plugin but a shortcoming of the device simulation. Going to close this issue.

I experience this when using:
showAt(L.Point/L.LatLng, [data]) to position the contextmenu.
When using data from e.layerPoint of the clicked element, I noticed that suddenly the contextmenu allways show at top of window - after zooming in. (before zooming the menu showed where I clicked).
But when using data from e.latlng, in showAt - the contextmenu allways show where I clicked in the map.