-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngAttr* directive issue with href
attribute in IE
#5479
Conversation
I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let me know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
From looking at the history there appears to have been an issue with an old IE (possibly IE7) regarding accessing the Since we are no longer testing on IE7, this may be why the tests are no longer failing... |
See 259c2bb |
From http://msdn.microsoft.com/en-us/library/ie/ms536429(v=vs.85).aspx:
So it seems that this is for IE8 support. Perhaps the check should be |
Here is a fork that does this: http://plnkr.co/edit/xtAaQJYBFr7LDZad7onQ?p=preview |
I can confirm that this works on IE11 and IE9. I'll knock up a branch and send it to the CI server for further testing. |
There is a special case for getting hold of the href value for old versions of IE. But it turns out that this actually breaks newer versions of IE. Closes angular#5479
Hmm. So the new spec fails on IE8 too! @plalx I think you are right. We should just drop the whole exceptional case! |
@IgorMinar I signed it for my next contribution ;) @petebacondarwin Thanks for fixing. In theory it shouldn't have been much of a big concern since there's the |
It appears that this exceptional case was only valid for IE<8 and that for IE>=8 it was actually causing a bug with the `ng-href-attr` directive on `<a>` elements. Closes angular#5479
It appears that this exceptional case was only valid for IE<8 and that for IE>=8 it was actually causing a bug with the `ng-href-attr` directive on `<a>` elements. Closes angular#5479
This fixes an issue where any form of
ng-attr-href
directive wasn't correctly processed in IE.I am not sure why there was the special IE condition for the href attribute but
node.getAttribute(name, 2)
doesn't make any sense since it's trying to fetch the binding value from the attribute we are actually trying to populate.I have removed the special case handling and every unit tests are still passing.
Issue Plunkr