Draggable: $.ui.ddmanager.current release on draggable _destroy

Fixes: #10667
Well, I'm all confused now... :)  Can it conclude with

if ($.ui.ddmanager && $.ui.ddmanager.current === this) {
  $.ui.ddmanager.current = null;
}

?

I only need that in _destroy of Draggable and Droppable. Can you help here
and push this change please?

2014-10-21 15:12 GMT+03:00 Scott González <notifications@github.com>:

> In ui/draggable.js:
>
> > @@ -91,6 +91,11 @@ $.widget("ui.draggable", $.ui.mouse, {
> >  		this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
> >  		this._removeHandleClassName();
> >  		this._mouseDestroy();
> > +
> > +        if ($.ui.ddmanager && $.ui.ddmanager.current && $.ui.ddmanager.current.element &&
> > +            ($.ui.ddmanager.current.element.get(0) === this.element.get(0))) {
>
> That was me. But I didn't suggest comparing jQuery objects just now, I
> suggested comparing plugin instances.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jquery/jquery-ui/pull/1366/files#r19143565>.
>