Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 11 years ago

#945 closed bug (fixed)

<INPUT name="length"> cannot be found under IE

Reported by: [email protected] Owned by:
Priority: minor Milestone: 1.1.3
Component: core Version: 1.1a
Keywords: ie6 ie7 Cc:
Blocked by: Blocking:


This is really incredible and took me some time to find out !


Load the mockup in IE6 or IE7, you'll get "0" instead of "1" printed on the alert box.


Don't set input name attributes to "length".


    <script type="text/javascript" src="http://jquery.com/src/jquery-latest.js"></script>
    <script type="text/javascript">
      $(function() { alert($('INPUT').length) });
    <input name="length">

Change History (5)

comment:1 Changed 16 years ago by brandon

Priority: majorminor

I've setup a test page with firebug lite here: http://brandon.jquery.com/testing/945/

comment:2 Changed 16 years ago by brandon

I believe I finally tracked this down to the jQuery.merge method. The for loop in that method isn't running because the expression, second.length, points to the node instead of pointing to the size of the array.

comment:3 Changed 16 years ago by john

Milestone: 1.1.3
need: Test Case

comment:4 Changed 16 years ago by joern

need: Test CasePatch

Added test in [1586].

comment:6 Changed 16 years ago by john

Resolution: fixed
Status: newclosed

Fixed in SVN.

Note: See TracTickets for help on using tickets.