Revisions browser: The back button should return to the post you were editing (use replaceState instead of pushState).

props adamsilverstein.
fixes #26997.


git-svn-id: https://develop.svn.wordpress.org/trunk@27114 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-02-06 23:27:47 +00:00
parent 99c1b7323c
commit 3dbd4f8dcb
1 changed files with 2 additions and 2 deletions

View File

@ -1070,9 +1070,9 @@ window.wp = window.wp || {};
var from = this.model.has('from') ? this.model.get('from').id : 0,
to = this.model.get('to').id;
if ( this.model.get('compareTwoMode' ) ) {
this.navigate( this.baseUrl( '?from=' + from + '&to=' + to ) );
this.navigate( this.baseUrl( '?from=' + from + '&to=' + to ), { replace: true } );
} else {
this.navigate( this.baseUrl( '?revision=' + to ) );
this.navigate( this.baseUrl( '?revision=' + to ), { replace: true } );
}
},