mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Mouse: Don't try to unbind delegated event handlers if they don't exist. Fixes #8416 - Draggable breaks during drag if any other draggable is removed or destroyed.
This commit is contained in:
8
ui/jquery.ui.mouse.js
vendored
8
ui/jquery.ui.mouse.js
vendored
@@ -47,9 +47,11 @@ $.widget("ui.mouse", {
|
||||
// other instances of mouse
|
||||
_mouseDestroy: function() {
|
||||
this.element.unbind('.'+this.widgetName);
|
||||
$(document)
|
||||
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
if ( this._mouseMoveDelegate ) {
|
||||
$(document)
|
||||
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
}
|
||||
},
|
||||
|
||||
_mouseDown: function(event) {
|
||||
|
||||
Reference in New Issue
Block a user