https://bugzilla.wikimedia.org/show_bug.cgi?id=39328
Web browser: ---
Bug #: 39328
Summary: redirectToFragment should try to avoid creating a
double history entry on fragment redirects
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: JavaScript
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l