#26997 closed defect (bug) (fixed)
Revisions screen should use replaceState not pushState
| Reported by: | adamsilverstein | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Revisions | Version: | 3.9 |
| Severity: | minor | Keywords: | has-patch 2nd-opinion |
| Cc: | Focuses: |
Description
Since backbone changes at version 0.9 rendered revision routes inactive (see #27575) history pushState doesn't make sense because while application states are being pushed to the browser history, using the back button does not resore the state (it only changes the URL) - it looks like this currently: http://cl.ly/0a090R1n2D1r
At Nacin's suggestion this ticket proposes using replaceState instead, triggered by adding { replace: true } to the navigate calls. After applying the attached patch, hitting the back button takes you back to the previous page (the post editing screen typically). The browser URL is still updated while navigating revisions to reflect the current application state so hitting refresh works, and linking or bookmarking the URL also works. It looks like this: http://cl.ly/310Q3K0h0413
Attachments (1)
Change History (6)
#2
@
12 years ago
- Keywords 2nd-opinion added; dev-feedback removed
- Milestone Awaiting Review → 3.9
This would make it a lot easier to navigate back to the post you were on. (In addition to #24682). The URLs are still sharable, that's really what matters.
Gonna seek a second opinion from markjaquith but otherwise I think this is good to go.
#3
@
12 years ago
I agree. I chose pushState intentionally, but it was based on a mistake (thinking that JS-based routing was working), and a thought I've since changed my mind about (that the gradations of history for your revisions escapades [revisions revisions?] are of interest to anyone and are worth the difficulty of getting back to the last non-revisions URL you viewed).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
use replaceState for revisions navigation