We should use pushState such that pressing the back button after clicking VisualEditor takes you back to read mode.
Version: unspecified
Severity: minor
We should use pushState such that pressing the back button after clicking VisualEditor takes you back to read mode.
Version: unspecified
Severity: minor
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | Jdforrester-WMF | T50426 VisualEditor: Pre-beta needs (tracker) | |||
Resolved | Krinkle | T45844 VisualEditor: Browser back button should work as expected |
To further clarify what the issue here is:
We currently use ?veaction=edit as trigger for VisualEditor from a permanent url.
This is implemented by checking the query parameter on page load and triggering init (just like a click on "VisualEditor" would do), and then we replace (without refresh) the url to drop this query parameter using the HTML5 History api (replaceState).
I'd recommend we build on this by using pushState when VisualEditor is initialised (we can then remove the current behaviour as there's no longer any reason to remove it from the url).
Note that it is slightly more complicated than just calling replaceState on init. We also need to listen on('popstate') to move back to read mode if the user presses Back to a url within the history that contains HTML5 history state data from VisualEditor.
Setting milestone to 2013-06-27 since it is marked as blocker for "Beta" (2013-07). It may be moved to an earlier milestone as we see fit. But no later than 06-27. Setting it since I use milestone to sort "My bugs".
Related URL: https://gerrit.wikimedia.org/r/67171 (Gerrit Change Ia4b949d9c066a3f7b07217aa3d51de9908734e85)
Related URL: https://gerrit.wikimedia.org/r/67172 (Gerrit Change I5c345c1526852a84b04436955845bf1b56d94402)
This seems to be broken again (back button changes URL but doesn't take user back to read state)
Lokal_Profil: Where? Example link? Browser? Reopening not helpful without giving instructions to reproduce... :-)
(In reply to Andre Klapper from comment #10)
Lokal_Profil: Where? Example link? Browser? Reopening not helpful without
giving instructions to reproduce... :-)
Sorry ;)
Confirmed in both Firefox and Chorme running on Ubuntu
Tested on both sv.wp[1] and en.wp[2] (logged out on sv.wp to make sure no personal settings were affecting it)
[1] https://sv.wikipedia.org/wiki/Bonsai?uselang=en
[2] https://en.wikipedia.org/wiki/Bonsai
(In reply to Lokal_Profil from comment #11)
(In reply to Andre Klapper from comment #10)
Lokal_Profil: Where? Example link? Browser? Reopening not helpful without
giving instructions to reproduce... :-)Sorry ;)
Confirmed in both Firefox and Chorme running on Ubuntu
Tested on both sv.wp[1] and en.wp[2] (logged out on sv.wp to make sure no
personal settings were affecting it)[1] https://sv.wikipedia.org/wiki/Bonsai?uselang=en
[2] https://en.wikipedia.org/wiki/Bonsai
Moved to bug 63739 as a new regression.