Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panning problems with iframed map in Chrome and Safari #1277

Closed
callumlocke opened this issue Jan 14, 2013 · 5 comments
Closed

Panning problems with iframed map in Chrome and Safari #1277

callumlocke opened this issue Jan 14, 2013 · 5 comments
Assignees
Labels
Milestone

Comments

@callumlocke
Copy link

Demo here: http://interactivegraphics.ft-static.com/maps/abandoned-tube-stations/bug-demo/wrap.html

This is a very simple Leaflet map inside an iframe. Open it in Chrome or Safari, pan the map with the mouse, and release the mouse button outside the iframe. The map continues to pan as you move your mouse, even though you are no longer dragging.

This appears to have been reported and fixed before (#166), but it seems the problem has returned. My demo uses the latest stable Leaflet, 0.4.5. It has no other libraries or anything else that could conflict with it.

Tested and confirmed bug in Chrome 23 and 26, and Safari 6 (on OS X Mountain Lion).

Also tested in Firefox 17 and Opera 12 – bug does not occur in these browsers.

@mourner
Copy link
Member

mourner commented Jan 14, 2013

The problem has not returned, it was fixed in a way that you can click inside the map again to "unstuck" it. Unfortunately there's no way to get around it as the original frame's document doesn't receive mouseout if it is in an iframe, it's a browser problem, not Leaflet's.

@jfirebaugh
Copy link
Member

It's been discovered that preventDefault on the mousedown event that begins the pan operation is what triggers this. In the issue referenced by @jasondavies, we're trying to figure out which is the lesser of two evils for d3: preventing or not preventing default.

@mourner mourner reopened this Jun 19, 2013
@mourner
Copy link
Member

mourner commented Jun 19, 2013

That's interesting. I've also been considering making some form of a fake preventDefault for some events that only ignores them on the map, but does propagate them further out of the map container. This would also help with issues like mobile UI frameworks relying on document events.

@ghost ghost assigned mourner and tmcw Jun 19, 2013
@tmcw tmcw closed this as completed in baef8e1 Jun 24, 2013
@mourner mourner reopened this Jun 25, 2013
@mourner
Copy link
Member

mourner commented Jun 25, 2013

@jfirebaugh still works on it for a complete solution to the problem (continuing #1782), should be ready any minute now.

@ghost ghost assigned jfirebaugh Jun 25, 2013
@mourner
Copy link
Member

mourner commented Jun 25, 2013

Finally fixed in #1786

@mourner mourner closed this as completed Jun 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants