Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit fbbb29e

Browse files
allsteadyGabriel Schulhof
authored andcommitted
Collapsible: fix the bug about collapsedIcon
Closes gh-6708 Fixes gh-7089
1 parent 70700a5 commit fbbb29e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/widgets/collapsible.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,11 @@ $.widget( "mobile.collapsible", {
201201
if ( currentOpts.collapsedIcon ) {
202202
anchor.removeClass( "ui-icon-" + currentOpts.collapsedIcon );
203203
}
204-
if ( opts.collapsedIcon ) {
205-
anchor.addClass( "ui-icon-" + opts.collapsedIcon );
204+
if ( /false/i.test( opts.collapsedIcon ) ) {
205+
anchor.removeClass( "ui-btn-icon-" + ( currentOpts.iconPos === "right" ? "right" : "left" ) );
206+
} else {
207+
anchor.addClass( "ui-icon-" + opts.collapsedIcon )
208+
.toggleClass( "ui-btn-icon-" + ( currentOpts.iconPos === "right" ? "right" : "left" ), true );
206209
}
207210
}
208211
} else {

0 commit comments

Comments
 (0)