Last Updated: February 25, 2016
·
7.666K
· coma

"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.

Recommend
Say Thanks
Update Notifications Off
Respond

2 Responses
Add your response

Did you happen to find a better fix for this? In my case I need to use the svgs as clickable elements

over 1 year ago ·

@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.

over 1 year ago ·