IMAGINARY / applauncher2

A graphical application launcher based on web technologies Mk2
Apache License 2.0
5 stars 1 forks source link

Support web browser back button to exit an app #10

Open porst17 opened 5 years ago

porst17 commented 5 years ago

I didn't test this thoroughly, but go to https://imaginary.github.io/applauncher2/, select an app and hit the back button it your browser. It's not leaving the app and going back to the main applauncher menu. Not sure if this is easy to implement (history.pushState() + onpopstate event?), but IMO it would be the expected behavior.

elondaits commented 5 years ago

Indeed, I plan to use the history API at some point to allow this (but also would allowing to have a link to an open app... these two things go hand in hand). However this demands some heavy refactoring, because the way the history API works clicking on an app button would only change the URL, and then a handler (in response to the URL change) would actually open the app. It's a way of programming that demands moving a lot of things around. I'd also have to include the language selection, so changing the language through the appLauncher menu would change the query string and this would then change the language.