Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.6] [state] don't make extra $location.replace() calls #9954

Merged
merged 1 commit into from
Feb 1, 2017

Conversation

elastic-jasper
Copy link
Contributor

[state] don't make extra $location.replace() calls

Backports PR #8179

Commit 1:
[state] don't make extra $location.replace() calls

Issue:
In order to ensure BWC in the new state-hashing changes, rison encoded query string parameters are automatically converted into hashes and placed back into the URL via $location.search().replace(). This ensures that extra history entries don't get created, but this is still happening when hashing is disabled (which is now the default). This causes every state-caused history change to become a replacement, which mutilates the history stack.

Fix:
Added a #isHashingEnabled() method to the state objects that is called before trying to convert rison encoded query string states and replacing them in the URL.

Backports PR #8179

**Commit 1:**
[state] don't make extra $location.replace() calls

Issue:
In order to ensure BWC in the new state-hashing changes, rison encoded query string parameters are automatically converted into hashes and placed back into the URL via `$location.search().replace()`. This ensures that extra history entries don't get created, but this is still happening when hashing is disabled (which is now the default). This causes every state-caused history change to become a replacement, which mutilates the history stack.

Fix:
Added a `#isHashingEnabled()` method to the state objects that is called before trying to convert rison encoded query string states and replacing them in the URL.

* Original sha: 9c52032
* Authored by spalger <email@spalger.com> on 2016-09-07T17:29:12Z
@spalger spalger added the v4.6.5 label Jan 19, 2017
@spalger spalger merged commit f0ee72d into 4.6 Feb 1, 2017
@epixa epixa deleted the jasper/backport/8179/4.6 branch February 8, 2017 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants