Verify that a widget is draggable before stripping its draggability. props filosofo, see #12863. Fixes widget creation for jQUI 1.8.5; should be fixed in jQUI 1.8.6.

git-svn-id: https://develop.svn.wordpress.org/trunk@15738 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-10-07 04:20:19 +00:00
parent b6c2c3003c
commit 6c9318e763
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ wpWidgets = {
ui.item.css({'marginLeft':'','width':''});
},
stop: function(e,ui) {
if ( ui.item.hasClass('ui-draggable') )
if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') )
ui.item.draggable('destroy');
if ( ui.item.hasClass('deleting') ) {