Navigation Menu

Skip to content

Commit

Permalink
Accordion: Use this.headers instead of parsing the DOM to find header…
Browse files Browse the repository at this point in the history
…s when determining which panel is active. Fixes #5841 - Accordion active property inaccurate if nested accordion is present.
  • Loading branch information
scottgonzalez committed Jul 20, 2010
1 parent e85615f commit f99068b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.accordion.js
Expand Up @@ -302,7 +302,7 @@ $.widget("ui.accordion", {

// TODO the option is changed, is that correct?
// TODO if it is correct, shouldn't that happen after determining that the click is valid?
o.active = o.collapsible && clickedIsActive ? false : $('.ui-accordion-header', this.element).index(clicked);
o.active = o.collapsible && clickedIsActive ? false : this.headers.index(clicked);

// if animations are still active, or the active header is the target, ignore click
if (this.running || (!o.collapsible && clickedIsActive)) {
Expand Down

0 comments on commit f99068b

Please sign in to comment.