Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

If you use html5mode on IE9, IE8 it fails with 10 $digest() iterations r... #2802

Conversation

pvasek
Copy link
Contributor

@pvasek pvasek commented May 27, 2013

There was an issue with location.replace method isn't changing the location.href immediately.

This pull-request is the same like this one #2782 but for 1.0.x branch.

…s reached.

There was an issue with location.replace method isn't changing the location.href immediately.
@petebacondarwin
Copy link
Member

PR Checklist (Minor Bugfix)

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name)
  • PR doesn't introduce new api
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update (if suitable)
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required commit message format)
  • All changes requested in review have been implemented

@petebacondarwin
Copy link
Member

This will need CLA signing, better commit message and unit tests

@matsko
Copy link
Contributor

matsko commented Jul 15, 2013

+1 for this feature :)

@pvasek
Copy link
Contributor Author

pvasek commented Jul 19, 2013

I just wanted to start writing unit tests for this PR but I am not even able to reproduce it anymore. Better to say I could reproduce it but i think it was just because the setting of base href attribute or links were wrong. That is a reason I am closing this PR.

It seems that what fix the issue for me is just try to get my settings working in different browsers in the same way. What worked for me If I use base href attribute to and with "/" (e.g. <base href="/index.html/"/>) and then all the links starts without initial slash (e.g. <a href="route1/id1">Item1</a>).

@pvasek pvasek closed this Jul 19, 2013
@IgorMinar
Copy link
Contributor

actually, I think that the fix is valid. we just tested it and finally understood what was happening in IE.

I'm going to go and merge this in without a test because testing this stuff isn't possible with a mock and we don't have another way to test this right now.

IgorMinar pushed a commit to IgorMinar/angular.js that referenced this pull request Jul 24, 2013
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which
don't support location href, we use location.replace to reload the page
with the hashbang equivalent of the url but this fails with infinite
digest. This is because location.replace doesn't update location.href
synchronously on IE8 and 9.

Closes angular#2802, angular#3305, angular#1417
IgorMinar pushed a commit that referenced this pull request Jul 24, 2013
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which
don't support location href, we use location.replace to reload the page
with the hashbang equivalent of the url but this fails with infinite
digest. This is because location.replace doesn't update location.href
synchronously on IE8 and 9.

Closes #2802, #3305, #1417
IgorMinar pushed a commit that referenced this pull request Jul 24, 2013
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which
don't support location href, we use location.replace to reload the page
with the hashbang equivalent of the url but this fails with infinite
digest. This is because location.replace doesn't update location.href
synchronously on IE8 and 9.

Closes #2802, #3305, #1417
@mattymess
Copy link

Thanks so much for this PR @pvasek!

@angelcabo
Copy link

This issue seems to manifest itself in IE 7 as well. The delays seen with location.replace also seem to happen with setting location.href directly and therefore an infinite loop can occur in IE 7.

btford pushed a commit to btford/angular.js that referenced this pull request Oct 2, 2013
Refactored `replacedUrl` to store the new URL on both
`location.replace` and setting `location.href` directly to handle
delays in the actual location value change in IE.

Closes angular#2802
btford pushed a commit that referenced this pull request Oct 2, 2013
Refactored `replacedUrl` to store the new URL on both
`location.replace` and setting `location.href` directly to handle
delays in the actual location value change in IE.

Closes #2802
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Refactored `replacedUrl` to store the new URL on both
`location.replace` and setting `location.href` directly to handle
delays in the actual location value change in IE.

Closes angular#2802
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Refactored `replacedUrl` to store the new URL on both
`location.replace` and setting `location.href` directly to handle
delays in the actual location value change in IE.

Closes angular#2802
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants