This commit is contained in:
Brandon Aaron 2007-05-13 17:20:03 +00:00
parent ff4f265bc0
commit 7c6100f5ed
3 changed files with 11 additions and 8 deletions

View file

@ -229,7 +229,8 @@ jQuery.extend({
// Do a quick check for the existence of the actual ID attribute
// to avoid selecting by the name attribute in IE
if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && oid.id != m[2] )
// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
// Do a quick check for node name (where applicable) so