This repository was archived by the owner on Apr 12, 2024. It is now read-only.
fix($browser): don’t use history api when only the hash changes #9406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IE10/11 have the following problem: When changing the url hash
via
history.pushState()
and then reverting the hash via directchanges to
location.href
(or via a link) does not fire ahashchange
norpopstate
event.This commit changes the default behavior as follows:
Uses
location.href
/location.replace
if the new url differs fromthe previous url only in the hash fragment or the browser
does not support history API.
Use
history.pushState
/history.replaceState
otherwise.Fixes #9143