Skip to main content

Search and Top Navigation

#10126 closed bug (notabug)

Opened June 23, 2014 05:20PM UTC

Closed July 16, 2014 05:01PM UTC

Accordion: Appending new items with all panels closed via 'active: none' opens added panel

Reported by: jcwren Owned by:
Priority: minor Milestone: none
Component: ui.accordion Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:
Description

If a set of panels is created with 'active: none' set, and a new panel is appended and the accordion refreshed, the new panel is opened. If another panel is already opened, then the new panel is not opened. The 'refresh' method appears to not be honoring the configured 'active' setting.

Demonstration -- http://jsfiddle.net/jcwren/MGKMH/

Attachments (0)
Change History (6)

Changed June 24, 2014 02:28AM UTC by tj.vantoll comment:1

status: newopen
summary: Appending new items with all panels closed via 'active: none' opens added panelAccordion: Appending new items with all panels closed via 'active: none' opens added panel

Confirmed against master: http://jsfiddle.net/tj_vantoll/MGKMH/2/

Changed July 16, 2014 04:41PM UTC by jperrault comment:2

I spoke with @scott_gonsalez in #jqueryui-dev, and the behavior described in this ticket seems to be the expected behavior.

Changed July 16, 2014 04:45PM UTC by jcwren comment:3

Replying to [comment:2 jperrault]:

I spoke with @scott_gonsalez in #jqueryui-dev, and the behavior described in this ticket seems to be the expected behavior.

Well, that's... disappointing. And seemingly insane. It's easier to programmatically open it than have to find it and close it.

Changed July 16, 2014 04:49PM UTC by jperrault comment:4

Scott also mentioned that 'active: none' is an invalid value, it should be 'active: false'. With the false setting, your first scenario results in the header remaining closed.

Changed July 16, 2014 04:52PM UTC by jcwren comment:5

Replying to [comment:4 jperrault]:

Scott also mentioned that 'active: none' is an invalid value, it should be 'active: false'. With the false setting, your first scenario results in the header remaining closed.

I guess that's the danger in trusting an accepted answer from StackOverlow.

http://stackoverflow.com/questions/2675263/collapse-all-sections-in-accordian-on-page-load-in-jquery-accordian

Changed July 16, 2014 05:01PM UTC by scottgonzalez comment:6

resolution: → notabug
status: openclosed

Here is a fiddle showing it working properly: http://jsfiddle.net/MGKMH/3/