question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zoomEnd event fired twice in master with FF & Chrome

See original GitHub issue

Hi,

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().

However, Leaflet 1.0.0-b1 does not seem to have this issue (nor stable).

I am using FF and Chrome on Ubuntu.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
oldrich-scommented, Mar 11, 2016

Any solution to this? It impacts other libraries. Se e.g.

https://github.com/Leaflet/Leaflet.markercluster/issues/646

0reactions
perliedmancommented, Apr 1, 2016

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 the requestAnimFrame? Might of course introduce some other race.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found