]> source.dussan.org Git - jquery-ui.git/commitdiff
Core (widget): don't pass DOM objects to $.fn.add. Fixes #5743 ($.fn.remove does...
authorSamuel Cormier-Iijima <sam@chide.it>
Thu, 8 Jul 2010 15:36:48 +0000 (23:36 +0800)
committerScott González <scott.gonzalez@gmail.com>
Thu, 8 Jul 2010 16:11:06 +0000 (00:11 +0800)
ui/jquery.ui.widget.js

index a9829d2e520846605ec1c34b2509364fb05ab3d3..c71832a69d8ddc22eb4faf47e7f4cd25a285cc75 100644 (file)
@@ -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" );
                                });
                        }