Update button.js

Change tooltip when label changes
This commit is contained in:
volkirik 2018-06-15 18:45:10 +03:00 committed by GitHub
parent 74f8a0ac95
commit 4f205e20b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,8 +238,8 @@ $.widget( "ui.button", {
// Make sure we can't end up with a button that has neither text nor icon
if ( key === "showLabel" ) {
this._toggleClass( "ui-button-icon-only", null, !value );
this._updateTooltip();
this._toggleClass( "ui-button-icon-only", null, !value );
this._updateTooltip();
}
if ( key === "label" ) {
@ -255,6 +255,7 @@ $.widget( "ui.button", {
this._attachIconSpace( this.options.iconPosition );
}
}
this._updateTooltip();
}
this._super( key, value );