You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@taylorhutchison Just submitted a pull that I believe fixes your issue(and I included your test), however I think @mourner will come in with a better method of fixing this.
It seems stopping propagation of contextmenu up from the popup was the most logical solution to the problem, so safe to close after merging the pull I think.
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.
The text was updated successfully, but these errors were encountered: