mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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.
This commit is contained in:
parent
e85615fc6b
commit
f99068bb4f
2
ui/jquery.ui.accordion.js
vendored
2
ui/jquery.ui.accordion.js
vendored
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user