zoomEnd event fired twice in master with FF & Chrome
See original GitHub issueHi,
It looks like Leaflet master (and 1.0.0-beta.2) sometimes fires twice zoomEnd
event after a zoom in our out, whether using the mouse wheel, zoom control buttons, or programmatical map.zoomIn()
/ map.zoomOut()
.
- With Leaflet CDN 1.0.0-beta.2: http://jsfiddle.net/3v7hd2vx/11/
- With CloudFlare CDN 1.0.0-beta.2.rc.2: http://jsfiddle.net/3v7hd2vx/9/
However, Leaflet 1.0.0-b1 does not seem to have this issue (nor stable).
- With Leaflet CDN 1.0.0-b1: http://jsfiddle.net/3v7hd2vx/10/
I am using FF and Chrome on Ubuntu.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
jQuery blur event fired twice in Chrome
I created a simple 'infinite' form with input fields. Every time an empty input is focused it creates a new one, and on...
Read more >299805 - paste event fires twice - chromium
Steps to reproduce the problem: 1. Add a paste event handler to an input that calls alert(). 2. Use CTRL-V to paste some...
Read more >5 Ways to Prevent the 300ms Click Delay on Mobile Devices
1. Don't Fret About it · 2. Disable Zooming (Chrome and Firefox) · 3. Set the viewport to the device-width (Chrome 32+) ·...
Read more >Pwn2Own
Pwn2Own is a computer hacking contest held annually at the CanSecWest security conference. First held in April 2007 in Vancouver, the contest is...
Read more >The Best Free Google Chrome Extensions
There's no denying Chrome's popularity. Plus, like Firefox, it supports extensions that make it even better. Its library of extras, found at the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any solution to this? It impacts other libraries. Se e.g.
https://github.com/Leaflet/Leaflet.markercluster/issues/646
The original fix (3e200bed22bdb1f59e54f37c93b4fce034fd7ee4) protects a call to
_resetView
, while the current code in master doesn’t call_resetView
directly, but only indirectly by when calling_moveEnd
.How about just calling the
_moveEnd
inside therequestAnimFrame
? Might of course introduce some other race.