tootlab-mastodon/app/javascript
Thibaut Girka cc396f085d Use history.state to decide whether we should goBack() or go to / (fixes #247)
So far, glitch-soc used history.length to decide whether to call `goBack()` or
go to / in order to not leave the webUI. This made clicking the “Back” button
go to the “Getting started” column instead of going back in the browser's
history when such an action would leave the web UI, but also when:
- The WebUI is refreshed (F5)
- A tab is restored
- The history length reaches its maximum (e.g., 50 in Firefox)

This commit fixes these shortcomings by checking `window.history.state`.
Indeed, we only want to go back in the browser's history when the current
location has been reached from within the WebUI, which only happens via
`pushState` as far as I know. Since browser store the serialized state in
the browser history, this also survives page reload and session restoration.
2018-05-31 14:39:02 +02:00
..
core Merge remote-tracking branch 'origin/master' into gs-master 2018-05-03 17:23:44 -05:00
flavours Use history.state to decide whether we should goBack() or go to / (fixes #247) 2018-05-31 14:39:02 +02:00
fonts Theme: Windows 95 2018-01-05 16:22:58 -08:00
images Merge branch 'master' of https://github.com/tootsuite/mastodon 2018-02-23 23:28:31 +09:00
locales Javascript intl8n flavour support 2017-12-10 11:08:04 -08:00
mastodon Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
packs Merge branch 'master' into glitch-soc/merge 2018-05-14 20:51:50 +02:00
skins Port Sylvhem's mastodon-light to glitch flavour 2018-05-07 17:00:02 +02:00
styles Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00