From: Scott González Date: Thu, 11 Mar 2010 20:21:38 +0000 (+0000) Subject: Button: No need to check the button type before removing the hidden class. X-Git-Tag: 1.8~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89f10420cf24ecb93d018da236399ba9b5588add;p=jquery-ui.git Button: No need to check the button type before removing the hidden class. --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index ce4c86a94..cf15d2ee6 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -202,7 +202,7 @@ $.widget( "ui.button", { destroy: function() { this.buttonElement - .removeClass( baseClasses + " " + otherClasses ) + .removeClass( baseClasses + " ui-helper-hidden-accessible " + otherClasses ) .removeAttr( "role" ) .removeAttr( "aria-pressed" ) .html( this.buttonElement.find(".ui-button-text").html() ); @@ -211,10 +211,6 @@ $.widget( "ui.button", { this.buttonElement.removeAttr( "title" ); } - if ( this.type === "checkbox" || this.type === "radio" ) { - this.element.removeClass('ui-helper-hidden-accessible'); - } - $.Widget.prototype.destroy.call( this ); },