From 89f10420cf24ecb93d018da236399ba9b5588add Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 11 Mar 2010 20:21:38 +0000 Subject: [PATCH] Button: No need to check the button type before removing the hidden class. --- ui/jquery.ui.button.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 ); }, -- 2.39.5