Akryum / vue-googlemaps

Integrate Google Maps in your Vue application
https://akryum.github.io/vue-googlemaps/
529 stars 60 forks source link

Safari browser back button works only after couple of clicks #26

Open hunter-s70 opened 6 years ago

hunter-s70 commented 6 years ago

I'm using vue-googlemaps in my project. In Safari browser (desktop, mobile) when I go to the page which contains google map it create few instances of google map and duplicates this page in browser history (after second entering on the page without reloading page).

So browser back button works only after couple of clicks on it.

justinotero commented 6 years ago

It is an issue of Google Maps in Safari. Doesn't specifically refer to Vue/React/Angular. If you log your browser history, you will see normal url state changes will simply add a new state into the history. When you navigate to a page with Google Maps, it triggers two new states in browser history. Resulting in the user have to click the back button more than once.