Always replace state with VE tag when loading

Instead of just when venotify is used. To stop the back button breaking.

Bug: 63739
Change-Id: I637818f34a9015076c85c6daccb337503ad2499d
This commit is contained in:
Krenair 2014-04-14 17:19:30 +01:00 committed by Alex Monk
parent 261fcbbbc0
commit e9153fdccf

View file

@ -135,10 +135,15 @@ ve.init.mw.ViewPageTarget = function VeInitMwViewPageTarget() {
new mw.Title( this.pageName ).toText()
)
} );
if ( window.history.replaceState ) {
delete currentUri.query.venotify;
window.history.replaceState( this.popState, document.title, currentUri );
}
if ( window.history.replaceState ) {
// This is to stop the back button breaking when it's supposed to take us back out
// of VE. It used to only be called when venotify is used. FIXME: there should be
// a much better solution than this.
window.history.replaceState( this.popState, document.title, currentUri );
}
this.setupSkinTabs();