Vue2Leaflet: @click event not working inside l-icon
Description
I’ve been trying to make a custom marker icon which reacts to mouse events (basically triggers a function call on click). Unfortunately this doesn’t seem to work
Live Demo
https://jsfiddle.net/nvcqw7d2/2/
Steps to Reproduce
Open above JSFiddle
Expected Results
Clicking on a element in the red box should open a alert
Actual Results
Nothing happens
Browsers Affected
- Chrome
- Firefox
- Edge
- Safari 9
- Safari 8
- IE 11
Versions
- Leaflet: v1.5.0
- Vue: v2.15.6
- Vue2Leaflet: v2.2.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (11 by maintainers)
as much as I like @disarticulate hack (or solution) to get this working, it SHOULD work right on the <l-marker @click.native=“randFunc()”> makes no sense the event doesn’t get triggered when clicking the marker if an icon is assigned on render. Don’t you agree? Bug?