Skip to content

Commit 124f846

Browse files
committed
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
1 parent 08a750a commit 124f846

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ui/jquery.ui.button.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,12 @@ $.widget( "ui.buttonset", {
338338
destroy: function() {
339339
this.element.removeClass( "ui-button-set" );
340340
this.buttons
341+
.map(function() {
342+
return $( this ).button( "widget" )[ 0 ];
343+
})
344+
.removeClass( "ui-corner-left ui-corner-right" )
345+
.end()
341346
.button( "destroy" )
342-
.removeClass( "ui-corner-left ui-corner-right" );
343347

344348
$.Widget.prototype.destroy.call( this );
345349
}

0 commit comments

Comments
 (0)