Bug Tracker

Ticket #6111 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

Change History

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid
  • Component changed from unfiled to selector

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.