an error occurred with click event on svg element using "live" or "delegate" #2826

castersupermild opened this Issue Oct 25, 2011 · 4 comments


None yet

4 participants


confirmed in Google Chrome 14.0.835.202 on Windows7, iPad2 on iOS5.0(9A334)

In case of RC2: line 3112

error messsage(Chrome): uncaught TypeError: Cannot call method 'toLowerCase' of undefined
error message(Mobile Safari): TypeError: 'undefined' is not an object

Maybe modified like this:


        if ( ele.nodeName.toLowerCase() == "a" ) {


        if ( ele.nodeName && ele.nodeName.toLowerCase() == "a" ) {

This workaround will fixes raising the error,
but I cannot still handle the click event.
I think it's a problem with jQuery.


Can you make a test page that only includes jQuery core and see if this problem still happens? If so, please log an issue in that tracker and close this. If it only happens with jQM included, please make a minimal test page using this template:



In test page that only includes jQuery core an error does not occur. (But I cannot handle the event.) jQuery core only test page:

In test page that includes jQM an error occurs. test page with jQM:

SVG element that has symbol tag with path tag is type SVGElementInstance.
SVG element that does not has it is type SVGSVGElement.

In SVGElementInstance, element has not nodeName property and an error occurs.

I confirmed this problem happens in IE9, Chrome15.


Thanks for following up. We'll take a look but this is tagged as a low priority issue.

@jblas jblas added a commit that referenced this issue Nov 16, 2011
@jblas jblas Fix for #2826 - an error occurred with click event on svg element usi…
…ng "live" or "delegate"

- Modified findClosestLink() to check the ele.nodeName type before trying to access it.
jblas commented Nov 16, 2011

Fix landed on the HEAD:


@jblas jblas closed this Nov 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment