Skip to main content

Bug Tracker

Side navigation

#6111 closed bug (invalid)

Opened February 17, 2010 02:19PM UTC

Closed June 15, 2010 12:07AM UTC

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:
Description

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 />

Attachments (0)
Change History (1)

Changed June 15, 2010 12:07AM UTC by dmethvin comment:1

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.