mastodon/app
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
..
chewy Full-text search for authorized statuses (#6423) 2018-02-09 23:04:47 +01:00
controllers Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
helpers Merge branch 'master' into glitch-soc/merge-upstream 2018-05-19 22:41:10 +02:00
javascript Use history.state to decide whether we should goBack() or go to / (fixes #247) 2018-05-31 14:39:02 +02:00
lib Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
mailers Account archive download (#6460) 2018-02-21 23:21:32 +01:00
models Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
policies Merge remote-tracking branch 'origin/master' into gs-master 2018-05-03 17:23:44 -05:00
presenters Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-05-04 18:17:32 +00:00
serializers Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
services Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
validators Merge branch 'master' into glitch-soc/merge-upstream 2018-05-29 13:52:26 +02:00
views Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-05-21 18:17:23 +00:00
workers checking http status code with range (#7544) 2018-05-19 14:47:44 +02:00