Skip to main content

Search and Top Navigation

#5841 closed bug (fixed)

Opened July 20, 2010 07:57PM UTC

Closed July 20, 2010 08:15PM UTC

Last modified November 19, 2010 06:26PM UTC

Accordion active property inaccurate if nested accordion is present

Reported by: Nick_Craver Owned by:
Priority: minor Milestone: 1.8.3
Component: ui.accordion Version: 1.8.2
Keywords: accordion nested active Cc:
Blocked by: Blocking:
Description

I've setup a full demo here: http://jsfiddle.net/nick_craver/RJgaG/

If you click on any section you'll see the index is including the child accordion's headers. It's happening because of how .active is set:

o.active = o.collapsible && clickedIsActive ? false : $('.ui-accordion-header', this.element).index(clicked);

It's looking for ''all'' headers, not just the ones belonging to this level accordion. It seems like it should be:

o.active = o.collapsible && clickedIsActive ? false : this.headers.index(clicked);

Here's that version running: http://jsfiddle.net/nick_craver/dK6SD/

Attachments (0)
Change History (4)

Changed July 20, 2010 08:01PM UTC by Nick_Craver comment:1

To be clear what the bug is without viewing the demo, the active option of the accordion widget is incorrect if there's a nested accordion present. It's headers will be factored into the the active index calculation when they shouldn't be, causing an inaccurate, higher index to be reported.

Changed July 20, 2010 08:15PM UTC by scottgonzalez comment:2

milestone: TBD1.9
resolution: → fixed
status: newclosed

Fixed in f99068b. Thanks.

Changed August 04, 2010 01:31AM UTC by scottgonzalez comment:3

milestone: 1.91.8.3

Changed November 19, 2010 06:26PM UTC by Scott González comment:4

Accordion: Use this.headers instead of parsing the DOM to find headers when determining which panel is active. Fixes #5841 - Accordion active property inaccurate if nested accordion is present.

Changeset: f99068bb4ff7fc0ceec154ac8e3b63e088246047