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
Can not stop propagation or prevent default on circle marker clicks. @click.stop and/or @click.prevent throw errors. Original event seems to be in an object called $event.originalEvent but calling preventDefault() and stopPropagation() doesn't have any effect on it.
Hi @DonNicoJs any reason you use DomEvent.on ti attach listeners to Leaflet object ?
As these are 'Interactive layer' we could ( and I think should, in order to solve this issue) use on from Evented class.
I noticed this while attaching different handler on Marker, Polyline and Map. I always have both handlers called (as in an event propagation) with Vue2Leaflet, and never when I a attach directly to mapObject
I would recommend to swap DomEvent.on(this.mapObject, this.$listeners);
by this.mapObject.on(this.$listeners);
Description
Can not stop propagation or prevent default on circle marker clicks.
@click.stop
and/or@click.prevent
throw errors. Original event seems to be in an object called$event.originalEvent
but callingpreventDefault()
andstopPropagation()
doesn't have any effect on it.Live Demo
https://jsfiddle.net/gulyamani/541bpcja/1/
Steps to Reproduce
Open console and click circle markers.
Expected Results
Only seeing 'marker click' on console.
Actual Results
Seeing both 'marker click' and 'map click'
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: