Opened 11 years ago

Closed 9 years ago

#3920 closed bug (fixed)

accordion on table breaks $.before function in FireFox

Reported by: dlgrasse Owned by:
Priority: major Milestone: 1.8.2
Component: ui.accordion Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

When applying an accordion to a table (thead being the header property and the tbody being the part that's hidden/shown), invoking $('tbody tr:last').before inserts new rows at the top of the table in FireFox 1.x and 3.x. IE6 and 7 and Safari 3.x work fine.

This behavior is only seen if no calls to #before have been invoked before the accordion is collapsed (either by configuring the accordion to start off closed or by the user closing it). That is, If you first start with a closed accordion, then open it, then start adding rows (by calling #before as shown above), the rows appear at the top of the table. If the accordion starts open and you call #before to add a row, it works fine. If you start with a closed accordion, open it, add rows, then close it and then reopen it, the rows that were originally added to the top are then shown correctly and continue to be added correctly. (I hope that's clear.)

I've attached a simple HTML page that demonstrates the behavior. The accordion is applied to the HTML table and closed by default. Click on the thead to open the accordion and click the button. Notice how the inserted rows (via #before) appear at the top. Now click the header to close the accordion, and then re-open it. Notice how the rows now appear at the bottom, and newly inserted rows continue at the bottom.

Trac isn't letting me choose version 1.5.3, but I've verified it in that version and in 1.6.rcX

Attachments (1)

test.html (1.1 KB) - added by dlgrasse 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by dlgrasse

Attachment: test.html added

comment:1 Changed 11 years ago by paul

Milestone: TBD1.next

comment:2 Changed 9 years ago by Scott González

Milestone: 1.next1.8.2
Resolution: fixed
Status: newclosed

This works in 1.8. At least in the sense, that .before() still works.

Note: See TracTickets for help on using tickets.