[wp-trac] [WordPress Trac] #26997: Revisions screen should use replaceState not pushState
WordPress Trac
noreply at wordpress.org
Mon Feb 3 16:20:00 UTC 2014
#26997: Revisions screen should use replaceState not pushState
-----------------------------+-----------------------------
Reporter: adamsilverstein | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Revisions | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
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
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26997>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list