Bug Tracker

Opened 13 years ago

Closed 13 years ago

#6111 closed bug (invalid)

find() found a wrong number of tags using IE7

Reported by: SBuzzi Owned by:
Priority: Milestone: 1.4.2
Component: selector Version: 1.4.1
Keywords: IE7 find wrong count of tags Cc:
Blocked by: Blocking:


Hi, when I try to use this test code <div class="matrixSetup">R <input value="3" ></input> - C <input value="3" ></input> <a href="#" onclick="alert ($(this).parent().find(':input').size());">Modify</a></div> the alert box shows 4 elements in IE7, only to elements in Chrome 4.0 and in Firefox 3.6. I found a workaround based on the use of contract tag syntax <input />

Change History (1)

comment:1 Changed 13 years ago by dmethvin

Component: unfiledselector
Resolution: invalid
Status: newclosed

You cannot use the </input> tag in HTML4, the tag is always assumed to have no children and be self closing, even if you don't use <tag /> syntax. So jQuery is just finding the markup as interpreted by the browser. Even if your document was XHTML it wouldn't matter since IE doesn't support XHTML and will interpret the document as HTML.

Note: See TracTickets for help on using tickets.