File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,9 @@ $.widget( "ui.button", {
294
294
buttonClasses = [ ] ;
295
295
296
296
if ( icons . primary || icons . secondary ) {
297
- buttonClasses . push ( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons . primary ? "-primary" : "-secondary" ) ) ) ;
297
+ if ( this . options . text ) {
298
+ buttonClasses . push ( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons . primary ? "-primary" : "-secondary" ) ) ) ;
299
+ }
298
300
299
301
if ( icons . primary ) {
300
302
buttonElement . prepend ( "<span class='ui-button-icon-primary ui-icon " + icons . primary + "'></span>" ) ;
@@ -306,7 +308,6 @@ $.widget( "ui.button", {
306
308
307
309
if ( ! this . options . text ) {
308
310
buttonClasses . push ( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ) ;
309
- buttonElement . removeClass ( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" ) ;
310
311
311
312
if ( ! this . hasTitle ) {
312
313
buttonElement . attr ( "title" , buttonText ) ;
You can’t perform that action at this time.
0 commit comments