Opened 6 years ago

Closed 6 years ago

#9268 closed bug (duplicate)

Accordion widget refresh method sets active option to 0 when it was set to false

Reported by: StevenE Owned by:
Priority: minor Milestone: none
Component: ui.accordion Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

Dear,

The accordion widget refresh method sets the active option to 0 if it was set to false. I had a look at the code and I think the solution is easy: just change the "if" on line 6235 to an "else if" and the problem is solved.

Kind regards, Steven Engels.

Change History (5)

comment:1 Changed 6 years ago by tj.vantoll

Resolution: notabug
Status: newclosed

Using the boolean version of the active option requires you to set the collapsible option to true. If you pass {active: false} without setting collapsible, it is indeed changed to 0. But that is because false is an invalid value.

This appears to be working just fine: http://jsfiddle.net/tj_vantoll/RxaqD/. If you are still having issues let us know.

comment:2 in reply to:  1 ; Changed 6 years ago by StevenE

Replying to tj.vantoll:

Using the boolean version of the active option requires you to set the collapsible option to true. If you pass {active: false} without setting collapsible, it is indeed changed to 0. But that is because false is an invalid value.

This appears to be working just fine: http://jsfiddle.net/tj_vantoll/RxaqD/. If you are still having issues let us know.

It seems there is a mismatch between the github version and the distributed version. jsfiddle references to the github version and there this issue has indeed been fixed by the fix I suggested. If you change the reference in jsfiddle to http://code.jquery.com/ui/1.10.2/jquery-ui.js you can see the problem still exists there. I updated your jsfiddle http://jsfiddle.net/RxaqD/2/ But if it is solved on github I assume it will get solved in the distributed version too next time it gets released. thx, for the help.

comment:3 in reply to:  2 Changed 6 years ago by tj.vantoll

Replying to StevenE:

Replying to tj.vantoll:

Using the boolean version of the active option requires you to set the collapsible option to true. If you pass {active: false} without setting collapsible, it is indeed changed to 0. But that is because false is an invalid value.

This appears to be working just fine: http://jsfiddle.net/tj_vantoll/RxaqD/. If you are still having issues let us know.

It seems there is a mismatch between the github version and the distributed version. jsfiddle references to the github version and there this issue has indeed been fixed by the fix I suggested. If you change the reference in jsfiddle to http://code.jquery.com/ui/1.10.2/jquery-ui.js you can see the problem still exists there. I updated your jsfiddle http://jsfiddle.net/RxaqD/2/ But if it is solved on github I assume it will get solved in the distributed version too next time it gets released. thx, for the help.

Ah, yeah you're right. This is a duplicate of #9189 which was fixed in 1.10.3 and will be released soon.

comment:4 Changed 6 years ago by tj.vantoll

Resolution: notabug
Status: closedreopened

comment:5 Changed 6 years ago by tj.vantoll

Resolution: duplicate
Status: reopenedclosed

Duplicate of #9189.

Note: See TracTickets for help on using tickets.