From: Richard Worth Date: Wed, 17 Mar 2010 13:03:23 +0000 (+0000) Subject: Buttonset - remove corner classes from button widgets instead of button elements... X-Git-Tag: 1.8~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=124f84635f8f17a0af5085f64466050d1b0e263b;p=jquery-ui.git Buttonset - remove corner classes from button widgets instead of button elements on destroy. Fixes #5361 - buttonset method destroy doesn't remove corner classes from label elements --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 33534b88a..bb9aa4802 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -338,8 +338,12 @@ $.widget( "ui.buttonset", { destroy: function() { this.element.removeClass( "ui-button-set" ); this.buttons + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-corner-left ui-corner-right" ) + .end() .button( "destroy" ) - .removeClass( "ui-corner-left ui-corner-right" ); $.Widget.prototype.destroy.call( this ); }