Revisions browser: The back button should return to the post you were editing (use replaceState instead of pushState).
props adamsilverstein. fixes #26997. Built from https://develop.svn.wordpress.org/trunk@27114 git-svn-id: http://core.svn.wordpress.org/trunk@26981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
784d3071c9
commit
d4f8de5c92
|
@ -1070,9 +1070,9 @@ window.wp = window.wp || {};
|
||||||
var from = this.model.has('from') ? this.model.get('from').id : 0,
|
var from = this.model.has('from') ? this.model.get('from').id : 0,
|
||||||
to = this.model.get('to').id;
|
to = this.model.get('to').id;
|
||||||
if ( this.model.get('compareTwoMode' ) ) {
|
if ( this.model.get('compareTwoMode' ) ) {
|
||||||
this.navigate( this.baseUrl( '?from=' + from + '&to=' + to ) );
|
this.navigate( this.baseUrl( '?from=' + from + '&to=' + to ), { replace: true } );
|
||||||
} else {
|
} else {
|
||||||
this.navigate( this.baseUrl( '?revision=' + to ) );
|
this.navigate( this.baseUrl( '?revision=' + to ), { replace: true } );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue