Bug Tracker

Modify

Ticket #945 (closed bug: fixed)

Opened 6 years ago

Last modified 15 months ago

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

Reported by: zimbatm@… Owned by:
Priority: minor Milestone: 1.1.3
Component: core Version: 1.1a
Keywords: ie6 ie7 Cc:
Blocking: Blocked by:

Description

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

Problem

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

Workaround

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

Mockup

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

Change History

comment:1 Changed 6 years ago by brandon

  • Priority changed from major to minor

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

comment:2 Changed 6 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 6 years ago by john

  • need set to Test Case
  • Milestone set to 1.1.3

comment:4 Changed 6 years ago by joern

  • need changed from Test Case to Patch

Added test in [1586].

comment:6 Changed 6 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in SVN.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.