Skip to content

Commit fdb2867

Browse files
committed
Button: make sure position is not added to icon only buttons
1 parent 54304ef commit fdb2867

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ $.widget( "ui.button", {
124124
_updateIcon: function( icon ) {
125125
if ( !this.icon ) {
126126
this.icon = $( "<span>" ).addClass( this._classes( "ui-button-icon" ) + " ui-icon" );
127-
this.element.addClass( "ui-icon-" + this.options.iconPosition );
128127

129128
if ( !this.options.showLabel ){
130129
this.element.addClass( this._classes( "ui-button-icon-only" ) );
130+
} else {
131+
this.element.addClass( "ui-icon-" + this.options.iconPosition );
131132
}
132133
} else {
133134
this.icon.removeClass( this.options.icon );

0 commit comments

Comments
 (0)