X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector%2Fselector.js;h=6ad8e5cca8a85ffa46edf1e53969d3e82c459860;hb=19f5cf0c893aa2ba2ffb00c00c7efc1db4383f3e;hp=863148aa15e0d7548dfddce8276e58e0a484ea42;hpb=c512984303f3d2148c4a755ccb1f41bfcbcf9527;p=jquery.git diff --git a/src/selector/selector.js b/src/selector/selector.js index 863148a..6ad8e5c 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -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