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

Unable to get value of the property 'nodeName': object is null or undefined #10078

Closed
uriklar opened this issue Nov 16, 2014 · 10 comments
Closed

Comments

@uriklar
Copy link

uriklar commented Nov 16, 2014

I'm including svgs using and
Example:

<symbol viewBox="0 0 16 16" id="svg-icon-collapse-arrow"><title>collapse-arrow</title> <path style="fill-rule:evenodd;clip-rule:evenodd;" d="M2.859,5.826l0.818-0.822l4.319,4.348l4.325-4.348l0.818,0.823l-5.145,5.169L2.859,5.826z"/> </symbol>

<svg xmlns="http://www.w3.org/2000/svg" ng-click="someMethod()">
    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-icon-collapse-arrow" />
</svg>

And am getting an error (only in IE9):

Unable to get value of the property 'nodeName': object is null or undefined

This error only occurs in v1.3.2. It doesn't even happen in the 1.3 beta versions

@pkozlowski-opensource
Copy link
Member

@uriklar if you could put your code in http://plnkr.co/ or similar and provide a live reproduce scenario that would speed up things.

@uriklar
Copy link
Author

uriklar commented Nov 17, 2014

I added the code in http://plnkr.co/edit/#/IgIC1Hz87SElVAqiNCPM?p=catalogue but as for nowit won't reproduce. But in my app, as soon as I replaced the use with simply injecting the symbol content in the svg tag the problem was solved. Not sure what else in my app is causing the error

@pkozlowski-opensource
Copy link
Member

@uriklar yeh, we will need to isolate this one in order to move forward...

@uriklar
Copy link
Author

uriklar commented Nov 20, 2014

@pkozlowski-opensource Ok, I got the plunkr isolating the issue. Here it is: http://plnkr.co/edit/ej3cqYnqAdCnxiNYvFhz

The issue happens in IE9. Try clicking the svg icons a few times and you'll start getting the error:
Unable to get value of the property 'nodeName': object is null or undefined

@pkozlowski-opensource
Copy link
Member

@uriklar thnx, I can reproduce it systematically with the latest SNAPSHOT clicking on the second icon on IE9: http://plnkr.co/edit/yIXDfMdUvmb9XRU9xPTC?p=preview

@uriklar
Copy link
Author

uriklar commented Nov 20, 2014

Great. let me know if there's something I can do to help

@metamatt
Copy link
Contributor

This also happens in Safari (8 for sure, and probably earlier) and older versions of Chrome (before 37).

@pkozlowski-opensource
Copy link
Member

Yes, true, it happens on the Safari 7 as well.

@pkozlowski-opensource
Copy link
Member

So, this is essentially the same as #8118 and since it affects multiple browsers we should fix it. Working on a patch.

@pkozlowski-opensource
Copy link
Member

Here is a minimal reproduce scenario that breaks in Safari7: http://plnkr.co/edit/7C4fpO2Z94HFXE8VUB7a?p=preview

pkozlowski-opensource added a commit to pkozlowski-opensource/angular.js that referenced this issue Nov 22, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
pkozlowski-opensource added a commit to pkozlowski-opensource/angular.js that referenced this issue Nov 22, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.