From 1e58ab22ff2cffe587303ac08cd93ac9f48750a5 Mon Sep 17 00:00:00 2001 From: Dave Stein Date: Fri, 21 Dec 2012 17:53:40 -0500 Subject: [PATCH] Draggable: Added helper to the draggable data while it exists --- ui/jquery.ui.draggable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index f002797ec..5e5c2c9d4 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -199,6 +199,7 @@ $.widget( "ui.draggable", $.ui.interaction, { // If user cancels stop, leave helper there if ( this._trigger( "stop", event, this._fullHash( pointerPosition ) ) !== false ) { if ( this.options.helper ) { + delete this.element.data( 'draggable' ).helper; this.dragEl.remove(); } this._resetDomPosition(); @@ -231,6 +232,8 @@ $.widget( "ui.draggable", $.ui.interaction, { if ( this.options.appendTo || !helper.closest( "body" ).length ) { helper.appendTo( this._appendToEl() || this.document[0].body ); } + + this.element.data( 'draggable' ).helper = helper; return helper // Helper must be absolute to function properly