Page MenuHomePhabricator

redirectToFragment should try to avoid creating a double history entry on fragment redirects
Closed, ResolvedPublic


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.

Version: 1.21.x
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:48 AM
bzimport set Reference to bz39328.

Change 143852 had a related patch set uploaded by Bartosz Dziewoński:
On redirect, actually rewrite page URL to the target one with JavaScript

Change 143852 merged by jenkins-bot:
On redirects update the URL to that of the target page with JavaScript

I believe this should be fixed now.