The problem is when one controller registers a mousedown handler with "automatic event binding," then click in a disabled text input box, which is also a children element of that controller, and a script error window pops out. This seems only happens in IE8, not in IE9 and Firefox 12.
Example:
fail.html In IE8, clicking on the disabled text input box will cause a script error window popped out.
This page won't :
pass.html(Source of this example saved in
https://github.com/redeyes2015/jquerymx-test )
The only difference between these two pages is: 'div.inner mousedown' (fail) vs. '.inner mousedown' (pass)
The script error happens in
jquery/jquery.js, line 2827, saying: elem.nodeName has no member named
toLowerCase (because elem.nodeName is actually undefined)
While tracing back, I find out that window.event.target is set to a weird object whose
prototype,
length,
constructor and many others, are all 'undefined'
I happens to find work around for this problem, that is what I wrote in the pass.html, but I am still curious about the reason, and hope anyone to really solve this problem.
I am not a native English speaker, so ... Sorry for any strange expression, and thank you very much for reading this over.