Skip to content

Commit 6a388fc

Browse files
committed
Button: fixup
1 parent 5d6f5c5 commit 6a388fc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ui/button.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ $.widget( "ui.button", {
153153
}
154154
},
155155

156+
_elementsFromClassKey: function( classKey ) {
157+
switch ( classKey ) {
158+
case "ui-button-icon-only":
159+
if ( this.options.showLabel ) {
160+
return $();
161+
}
162+
break;
163+
case "ui-button-icon":
164+
if ( this.icon ) {
165+
return this.icon;
166+
}
167+
return $();
168+
default:
169+
return this._superApply( arguments );
170+
}
171+
},
172+
156173
_setOption: function( key, value ) {
157174
if ( key === "icon" ) {
158175
if ( value !== null ) {

0 commit comments

Comments
 (0)