origo-map / origo

Origo
Other
48 stars 53 forks source link

Print - Return the user to the map window after pressing the browser back button #1156

Open MattiasSp opened 3 years ago

MattiasSp commented 3 years ago

After opening the print window, we should expect many users to try pressing the browser's back button. Especially since the print window covers the entire map view, it sort of feels like a new page. Pressing the back button now takes the user out of Origo entirely, to the page visited before the Origo map.

Describe the solution you'd like Pressing the browser's back button should have the same effect as pressing the Print control's "close" button.

Describe alternatives you've considered Either History.pushState() or window.location = "#print" seem like possible solutions: https://developer.mozilla.org/en-US/docs/Web/API/History/pushState.

jokd commented 3 years ago

I think this is useful for the full screen modal as well!