Skip to content

Commit d5f81e7

Browse files
committed
Button: fixup
1 parent 94c8959 commit d5f81e7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/unit/button/button_options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test( "showLabel false without icon", function() {
4343
$( "#button" ).button({
4444
showLabel: false
4545
});
46-
strictEqual( $( "#button" ).attr( "class" ), "ui-button ui-widget ui-corner-all" );
46+
strictEqual( $( "#button" ).attr( "class" ), "ui-button ui-corner-all ui-widget" );
4747

4848
$( "#button" ).button( "destroy" );
4949
});
@@ -54,7 +54,7 @@ test("showLabel false with icon", function() {
5454
showLabel: false,
5555
icon: "iconclass"
5656
});
57-
strictEqual( $( "#button" ).attr( "class" ), "ui-button ui-widget ui-corner-all ui-button-icon-only" );
57+
strictEqual( $( "#button" ).attr( "class" ), "ui-button ui-corner-all ui-widget ui-button-icon-only" );
5858

5959
$( "#button" ).button( "destroy" );
6060
});

ui/button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ $.widget( "ui.button", {
8080
this.options.disabled = this.element.prop( "disabled" ) || false;
8181
}
8282

83+
this.hasTitle = this.element.attr( "title" );
8384
this._enhance();
8485

8586
if ( this.element.is( "a" ) ) {
@@ -97,7 +98,7 @@ $.widget( "ui.button", {
9798
this._setOption( "disabled", this.options.disabled );
9899

99100
this.element
100-
.addClass( this._classes( "ui-button" ) + "ui-widget" )
101+
.addClass( this._classes( "ui-button" ) + " ui-widget" )
101102
.attr( "role", "button" );
102103

103104
// Check to see if the label needs to be set or if its already correct

0 commit comments

Comments
 (0)