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 @@ -293,7 +293,9 @@ $.widget( "ui.button", {
293293 buttonClasses = [ ] ;
294294
295295 if ( icons . primary || icons . secondary ) {
296- buttonClasses . push ( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons . primary ? "-primary" : "-secondary" ) ) ) ;
296+ if ( this . options . text ) {
297+ buttonClasses . push ( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons . primary ? "-primary" : "-secondary" ) ) ) ;
298+ }
297299
298300 if ( icons . primary ) {
299301 buttonElement . prepend ( "<span class='ui-button-icon-primary ui-icon " + icons . primary + "'></span>" ) ;
@@ -305,7 +307,6 @@ $.widget( "ui.button", {
305307
306308 if ( ! this . options . text ) {
307309 buttonClasses . push ( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ) ;
308- buttonElement . removeClass ( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" ) ;
309310
310311 if ( ! this . hasTitle ) {
311312 buttonElement . attr ( "title" , buttonText ) ;
You can’t perform that action at this time.
0 commit comments