-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
View this on JSFiddle at: http://jsfiddle.net/thutch/ZzTL7/4/embedded/result/
System: Chrome 27 and IE10 on Windows 7 using Leaflet 0.5.1
Expected Behavior: Either GeoJSON layer would capture 'contextmenu' event before the map when it is between the click origin and the map OR the contextmenu event would fall back to the default action instead of triggering the contextmenu event on the map.
Actual Behavior: Map captures 'contextmenu' event instead of the GeoJSON layer when a popup over the GeoJSON layer is right-clicked.
In my app I bind a 'contextmenu' event to the map. On this event I fetch some GeoJSON from the server and add that feature to the map. I bind a 'contextmenu' event to this GeoJSON feature so as to remove this layer. In almost all test cases this works great. I add a feature with a right-click and can take it away with a right-click. However, if a popup is active and hovering over a GeoJSON layer and I right-click the popup it sends the event to the map rather than the GeoJSON layer.