From 124f84635f8f17a0af5085f64466050d1b0e263b Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Wed, 17 Mar 2010 13:03:23 +0000 Subject: [PATCH] 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 --- ui/jquery.ui.button.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ); }