mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-16 20:35:09 +00:00
Merge "Workaround apparent bug in Edge's history.pushState"
This commit is contained in:
commit
036f0fb186
|
@ -469,7 +469,12 @@
|
|||
hash = window.location.href.replace( /#.*$/, '' );
|
||||
}
|
||||
|
||||
this.browserHistory.pushState( null, title, hash );
|
||||
try {
|
||||
window.history.pushState( null, title, hash );
|
||||
} catch ( ex ) {
|
||||
// Workaround for Edge bug -- https://phabricator.wikimedia.org/T104381
|
||||
window.history.pushState( null, title, hash + '#' );
|
||||
}
|
||||
} else {
|
||||
// Since we voluntarily changed the hash, we don't want MMVB.hash (which will trigger on hashchange event) to treat it
|
||||
this.skipNextHashHandling = true;
|
||||
|
|
Loading…
Reference in a new issue