diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-03-27 16:47:57 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-04-12 14:45:48 -0400 |
commit | d345a0d7db841a143dcfdd3fb6fa6141cda435e9 (patch) | |
tree | 8acb573c1635ce16e7439404e0295b209a508ad1 /ui/jquery.ui.core.js | |
parent | dd58f9832ba34cf99bc3245d0c4c6ccc486a2ddc (diff) | |
download | jquery-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.js | 9 |
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; } |