Search and Top Navigation
#3920 closed bug (fixed)
Opened January 23, 2009 05:28PM UTC
Closed July 12, 2010 12:33PM UTC
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