Skip to content
Permalink
Browse files

Accordion: Use this.headers instead of parsing the DOM to find header…

…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 f99068bb4ff7fc0ceec154ac8e3b63e088246047
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.accordion.js
@@ -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)) {

0 comments on commit f99068b

Please sign in to comment.
You can’t perform that action at this time.