I am using jQuery UI 1.8.11 (the default in Visual Studio 2010 ASP.NET MVC projects) with all widgets enabled. I have a table with .draggable enabled on TD elements, and a div that is .droppable(). If I call .draggable("destroy") on the TDs the error "Uncaught TypeError: Cannot read property 'options' of undefined" is thrown on line 1617 of jquery-ui.1.8.11.js in the stop() function (Chrome 14.0.835 and IE9).
This error also occurs for jquery-ui-1.8.15, and jquery 1.5.1 or jquery 1.6.2.
Happens specifically when using draggable with revert == true and along with a droppable. If you call destroy within stop(), after the stop function exits the TypeError is thrown.
stop: function(event, ui) {
varo = $(this).data('draggable').options;
jquery-ui-1.8.11.js:1617Uncaught TypeError: Cannot read property 'options' of undefined
if (o._cursor) $('body').css("cursor", o._cursor);
}
Uncaught TypeError: Cannot read property 'options' of undefined