Skip to content

Commit 89c0961

Browse files
sciyoshiscottgonzalez
authored andcommitted
Core (widget): don't pass DOM objects to $.fn.add. Fixes #5743 ($.fn.remove does not trigger remove event for <select>s)
1 parent 594b7f5 commit 89c0961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $.fn.remove = function( selector, keepData ) {
1515
return this.each(function() {
1616
if ( !keepData ) {
1717
if ( !selector || $.filter( selector, [ this ] ).length ) {
18-
$( "*", this ).add( this ).each(function() {
18+
$( "*", this ).add( [ this ] ).each(function() {
1919
$( this ).triggerHandler( "remove" );
2020
});
2121
}

0 commit comments

Comments
 (0)