projecthorus / sondehub-tracker

🎈 Frontend for SondeHub Radiosonde Tracking
https://v2.sondehub.org
MIT License
61 stars 27 forks source link

Back navigation on mobile shouldn't close site when on menu #328

Closed LukePrior closed 1 week ago

LukePrior commented 4 months ago

We shouldn't close the site when user navigates back on mobile if menu is open.

Instead just close the menu, existing behaviour can be maintained for when the menu isn't open.

Se potential approach: https://stackoverflow.com/questions/25806608/how-to-detect-browser-back-button-event-cross-browser

https://github.com/projecthorus/sondehub-tracker/assets/22492406/de3c1103-f446-4ed4-893a-89466fac0418

TheSkorm commented 1 week ago

https://github.com/user-attachments/assets/bf0e593b-04dc-45a6-aba0-b0b93c92d4fb

There's a couple of edge/ui quirks with this, but I'm going to go with "its good enough"