Opened 9 years ago
Closed 9 years ago
#14667 closed bug (duplicate)
$('form').prop("tagName") won't return correct tag name
Reported by: | 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
Change History (4)
comment:2 follow-up: 3 Changed 9 years ago by
Same thing happens with plain DOM though.
http://jsfiddle.net/dmethvin/2gV3v/1/
Please read this, especially item 1: http://kangax.github.io/domlint/
comment:3 Changed 9 years ago by
Replying to 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.
comment:4 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #10891.
It would be great if we could fix everything, but unfortunately we can't.
Sorry for the wrong demo link, here it is: http://jsfiddle.net/alansalexer/2gV3v/