mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 00:03:56 +00:00
Merge "Chrome does not revert title to article title"
This commit is contained in:
commit
ec72d6284d
|
@ -882,13 +882,13 @@
|
|||
this.viewLogger.recordViewDuration();
|
||||
this.viewLogger.unattach();
|
||||
|
||||
document.title = this.createDocumentTitle( null );
|
||||
|
||||
if ( comingFromHashChange ) {
|
||||
comingFromHashChange = false;
|
||||
} else {
|
||||
this.router.back();
|
||||
}
|
||||
// update title after route change, see T225387
|
||||
document.title = this.createDocumentTitle( null );
|
||||
|
||||
// This has to happen after the hash reset, because setting the hash to # will reset the page scroll
|
||||
$( document ).trigger( $.Event( 'mmv-cleanup-overlay' ) );
|
||||
|
@ -942,11 +942,12 @@
|
|||
comingFromHashChange = false;
|
||||
return;
|
||||
}
|
||||
document.title = this.createDocumentTitle( this.currentImageFileTitle );
|
||||
this.router.navigateTo( document.title, {
|
||||
path: mw.mmv.getMediaHash( this.currentImageFileTitle ),
|
||||
useReplaceState: useReplaceState
|
||||
} );
|
||||
// update title after route change, see T225387
|
||||
document.title = this.createDocumentTitle( this.currentImageFileTitle );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue