Side navigation
#14667 closed bug (duplicate)
Opened January 03, 2014 01:55AM UTC
Closed January 05, 2014 02:24AM UTC
$('form').prop("tagName") won't return correct tag name
Reported by: | wenxuan.mo@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
For an HTMLFormElement, prop("tagName") won't return "form" if it has a child whose name property is "tagName", it returns this child node (object HTMLInputElement) instead.
demo: http://jsfiddle.net/rwaldron/da3nM/
details&discuss: http://stackoverflow.com/questions/20889098/a-js-exception-caused-by-form-element
Attachments (0)
Change History (4)
Changed January 03, 2014 02:37AM UTC by comment:1
_comment0: | http://jsfiddle.net/alansalexer/2gV3v/ → 1388716796309561 |
---|
Changed January 03, 2014 02:42AM UTC by comment:2
Same thing happens with plain DOM though.
http://jsfiddle.net/dmethvin/2gV3v/1/
Please read this, especially item 1: http://kangax.github.io/domlint/
Changed January 03, 2014 09:23AM UTC by comment:3
Replying to [comment:2 dmethvin]:
Same thing happens with plain DOM though. http://jsfiddle.net/dmethvin/2gV3v/1/ Please read this, especially item 1: http://kangax.github.io/domlint/
yeah, thanks for sharing the domlint. I agree that technically this is not a bug with jQuery, but it would be much better if jQuery can fix this up so that I can use jQuery selector and prop() function to avoid conflicts using plain DOM.
Sorry for the wrong demo link, here it is: http://jsfiddle.net/alansalexer/2gV3v/