Bug Tracker

Modify

Ticket #3403 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

Traversing lists upward causes failed selection in IE6

Reported by: bravesirrobin Owned by:
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: prev, list, nested lists, parent Cc: bravesirrobin, flesler
Blocking: Blocked by:

Description

Here's a sample of a case I encountered in development.

<head>

<script src=" http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){

var firstText = $("#testId").text(); var secondText = $("#testId").parent().prev().text(); alert(firstText+", "+secondText);

});

</script>

</head> <body> <ul>

<li>Bar</li> <ul>

<li>Things</li> <li id="testId">Stuff</li>

</ul> <li>Baz</li> <ul>

<li>Text</li> <li>Misc</li>

</ul>

</ul> </body> </html>

=========================================== In latest Firefox, Safari, Opera, the alert is "Stuff, Bar", but in IE6 this is "Stuff, ". It's like the DOM structure for IE6 is somehow different for nested ULs. Didn't have IE7 handy, but that would be something to check as well.

Change History

comment:1 Changed 5 years ago by flesler

  • Cc bravesirrobin, flesler added
  • Status changed from new to closed
  • Resolution set to invalid

The top <ul> has some children <ul>'s. That's illegal html.

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.