git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #1198
[jquery.git]
/
src
/
selector
/
selector.js
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
863148a
..
6ad8e5c
100644
(file)
--- 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
// 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
oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
// Do a quick check for node name (where applicable) so