-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Draggable: $.ui.ddmanager.current release on draggable _destroy #1366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixed, and now passes all tests / style guides |
@@ -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 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ever the case that current
exists but current.element
does not?
This still doesn't conform to the style guide, but we can fix that when we merge. For reference:
- Use
element[ 0 ]
instead ofelement.get( 0 )
; there's never a reason to use.get()
. - We use liberal spacing, which you're missing.
- The indentation for the second line of the conditional is wrong.
…ggable instance Fixes: #10667
@@ -84,6 +84,8 @@ $.widget("ui.draggable", $.ui.mouse, { | |||
}, | |||
|
|||
_destroy: function() { | |||
var ddmanager = $.ui.ddmanager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary.
Closing due to inactivity and lack of a CLA. |
Fixes: #10667