Last modified: 2014-09-02 16:24:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41328, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39328 - redirectToFragment should try to avoid creating a double history entry on fragment redirects
redirectToFragment should try to avoid creating a double history entry on fra...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.21.x
All All
: Low minor (vote)
: 1.24.0 release
Assigned To: Bartosz Dziewoński
:
Depends on: 35045
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-14 06:41 UTC by Daniel Friesen
Modified: 2014-09-02 16:24 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Friesen 2012-08-14 06:41:44 UTC
For fragment redirects we're currently using window.location.hash to update the fragment when the user visits the page.

This has the undesired consequence of creating two entries in the history in Firefox. So hitting the back button once just leaves you on the same page.

Instead of using location.hash we should consider using window.history.replaceState and element.scrollIntoView if they are both available.

Using replaceState will update the url by replacing the current history entry instead of creating a new one. It will disable the implicit jump so we'll have to use scrollIntoView to create the same effect.
Comment 1 Gerrit Notification Bot 2014-07-03 10:29:39 UTC
Change 143852 had a related patch set uploaded by Bartosz Dziewoński:
On redirect, actually rewrite page URL to the target one with JavaScript

https://gerrit.wikimedia.org/r/143852
Comment 2 Gerrit Notification Bot 2014-08-20 20:30:39 UTC
Change 143852 merged by jenkins-bot:
On redirects update the URL to that of the target page with JavaScript

https://gerrit.wikimedia.org/r/143852
Comment 3 Bartosz Dziewoński 2014-08-20 21:27:49 UTC
I believe this should be fixed now.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links