diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-08-09 11:45:41 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-08-09 11:45:41 -0400 |
commit | 92766654ae71e653e12ea4b0e43764cdf7b29a79 (patch) | |
tree | 407a773027a4d27a7cbe4cf5c807e9f4255d4f51 /ui | |
parent | d14629735648fb10403e38eac2b764ce6adf56c9 (diff) | |
download | jquery-ui-92766654ae71e653e12ea4b0e43764cdf7b29a79.tar.gz jquery-ui-92766654ae71e653e12ea4b0e43764cdf7b29a79.zip |
Widget: Wrap the remove event trigerring in a try/catch. Fixes #7510 - jQuery.data throws a script error in certain circumstances.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.widget.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index a66b8a54a..4c538d020 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -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 ); }; |