mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Widget: Wrap the remove event trigerring in a try/catch. Fixes #7510 - jQuery.data throws a script error in certain circumstances.
This commit is contained in:
parent
d146297356
commit
92766654ae
5
ui/jquery.ui.widget.js
vendored
5
ui/jquery.ui.widget.js
vendored
@ -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 );
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user