diff --git a/src/components/map/MapContextMenu.vue b/src/components/map/MapContextMenu.vue index 39b0368..2a70567 100644 --- a/src/components/map/MapContextMenu.vue +++ b/src/components/map/MapContextMenu.vue @@ -153,6 +153,11 @@ export default defineComponent({ props.leaflet.on('zoomstart', closeContextMenu); props.leaflet.on('contextmenu', (e: LeafletMouseEvent) => { + //Ignore right-clicks on controls + if(e.originalEvent.target && (e.originalEvent.target as HTMLElement).closest('.leaflet-control')) { + return; + } + e.originalEvent.stopImmediatePropagation(); e.originalEvent.preventDefault(); event.value = e;