"Uncaught TypeError: Cannot read property 'nodeName' of undefined" clicking on SVG elements
If you find this in your Chrome console:
Uncaught TypeError: Cannot read property 'nodeName' of undefined
then you are suffering from:
https://github.com/angular/angular.js/issues/8118
my quick fix:
svg {
pointer-events: none;
}
Obviously it will prevent any interaction with the SVG elements, but in my case, since I'm using them just as icons, it doesn't matter.
Written by Eduardo García Sanz
Related protips
2 Responses
Did you happen to find a better fix for this? In my case I need to use the svgs as clickable elements
@uriklar, I I haven't dug deeper since this solution suits my needs, but following the issue you'll find https://github.com/angular/angular.js/issues/7697#issuecomment-53101021 , so maybe you should fork the repo and make a PR to fix it.
Cheers.
Have a fresh tip? Share with Coderwall community!
AngularJS pages are long-lived browser apps with the same script risk as a newer single-page app. Third-party code in the template can read forms and values rendered on the page.
Security insights from Cside