Leaflet / Leaflet/Leaflet.VectorGrid
Problem with Leaflet >= 1.8
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 676
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I'm using VectorGrid and trying to catch the click event on one of my feature/vectorgrid using following code:
vectorGrid.on('click', function(e) {
L.popup()
.setContent("test")
.setLatLng(e.latlng)
.openOn(map);
}
It works perfectly fine with Leaflet 1.7.1 but crashes with Leaflet 1.8+. I get the following error when the click happens:
Uncaught TypeError: L.DomEvent.fakeStop is not a function
at NewClass._onClick (Leaflet.VectorGrid.bundled.min.js:2:15768)
at HTMLCanvasElement.handler (DomEvent.js:108:13)
Leaflet.VectorGrid.bundled.min.js:2
Strangely, the "mouseover" event is working fine.
Any idea on how to get it working?
Thanks a lot
Sam
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the click failure with Leaflet 1.8+ and inspect the _onClick path shown in Leaflet.VectorGrid.bundled.min.js, together with the referenced DomEvent.js handler. Compare the behavior with Leaflet 1.7.1 and verify that clicking a vector-grid feature opens the popup without an exception while mouseover continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100