mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Core (widget): don't pass DOM objects to $.fn.add. Fixes #5743 ($.fn.remove does not trigger remove event for <select>s)
This commit is contained in:
parent
594b7f5b23
commit
89c0961c38
2
ui/jquery.ui.widget.js
vendored
2
ui/jquery.ui.widget.js
vendored
@ -15,7 +15,7 @@ $.fn.remove = function( selector, keepData ) {
|
||||
return this.each(function() {
|
||||
if ( !keepData ) {
|
||||
if ( !selector || $.filter( selector, [ this ] ).length ) {
|
||||
$( "*", this ).add( this ).each(function() {
|
||||
$( "*", this ).add( [ this ] ).each(function() {
|
||||
$( this ).triggerHandler( "remove" );
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user