You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've looked at the documentation to make sure the behavior is documented and expected
I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
I've searched through the issues to make sure it's not yet reported
Steps to reproduce
We use the leaflet moveend event to update the url with query parameters center and zoom. When the user navigates through the browser history with the back and and next buttons, the map goes back to the positions reflected by the url.
This works, except in one case:
in Google Chrome,
if the user interacts with the map only with the mousewheel or trackpad.
Interact with the map only with the mousewheel or trackpad (zoom-in or zoom-out). Don't click-and-drag, and don't use the zoom control-button. The url updates.
Repeat the previous step a few times (Never click-and-drag, and never use the zoom control-button at all).
Click the back button of the browser.
Expected behavior
Clicks on the back button, should bring back to the previous positions of the map.
Current behavior
The first click on the back button goes back to the previous webpage (or blank page).
Environment
Leaflet version: 1.5.1
Browser (with version): Google Chrome 75
OS/Platform (with version): Mac os and windows
Additional context
This works as expected in other browsers: firefox, safari, edge
I noticed you don't necessarily have to interact with the map, if you first left-click any area outside the map for example. then use the mousewheel to zoom the map it works as expected too.
Steps to reproduce
We use the leaflet
moveend
event to update the url with query parameterscenter
andzoom
. When the user navigates through the browser history with the back and and next buttons, the map goes back to the positions reflected by the url.This works, except in one case:
To reproduce the bug, open this page (bug repro) in Google Chrome: francoisromain.github.io/bug-leaflet-chrome.
Expected behavior
Clicks on the back button, should bring back to the previous positions of the map.
Current behavior
The first click on the back button goes back to the previous webpage (or blank page).
Environment
Additional context
This works as expected in other browsers: firefox, safari, edge
Minimal example reproducing the issue
https://github.com/francoisromain/bug-leaflet-chrome
The text was updated successfully, but these errors were encountered: