]> source.dussan.org Git - jquery-ui.git/commitdiff
Widget: Wrap the remove event trigerring in a try/catch. Fixes #7510 - jQuery.data...
authorScott González <scott.gonzalez@gmail.com>
Tue, 9 Aug 2011 15:45:41 +0000 (11:45 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 9 Aug 2011 15:45:41 +0000 (11:45 -0400)
ui/jquery.ui.widget.js

index a66b8a54ab075925b5557c95f3697715c3e0474d..4c538d020fe5c3b6f9ab55350358c382fcdc80f1 100644 (file)
@@ -14,7 +14,10 @@ var slice = Array.prototype.slice;
 var _cleanData = $.cleanData;
 $.cleanData = function( elems ) {
        for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
-               $( elem ).triggerHandler( "remove" );
+               try {
+                       $( elem ).triggerHandler( "remove" );
+               // http://bugs.jquery.com/ticket/8235
+               } catch( e ) {}
        }
        _cleanData( elems );
 };