aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.core.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-03-27 16:47:57 -0400
committerMike Sherov <mike.sherov@gmail.com>2013-04-12 14:45:48 -0400
commitd345a0d7db841a143dcfdd3fb6fa6141cda435e9 (patch)
tree8acb573c1635ce16e7439404e0295b209a508ad1 /ui/jquery.ui.core.js
parentdd58f9832ba34cf99bc3245d0c4c6ccc486a2ddc (diff)
downloadjquery-ui-d345a0d7db841a143dcfdd3fb6fa6141cda435e9.tar.gz
jquery-ui-d345a0d7db841a143dcfdd3fb6fa6141cda435e9.zip
Draggable: allow draggable to defer destroying itself upon DOM removal until after stop is fired. Fixes #6889 - Draggable: Cursor doesn't revert to pre-dragging state after revert action when original element is removed.
Diffstat (limited to 'ui/jquery.ui.core.js')
-rw-r--r--ui/jquery.ui.core.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index bbe5da333..f0d9e42ec 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -276,10 +276,15 @@ $.ui.plugin = {
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
- call: function( instance, name, args ) {
+ call: function( instance, name, args, allowDisconnected ) {
var i,
set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
+
+ if ( !set ) {
+ return;
+ }
+
+ if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
return;
}