mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00: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:
parent
7e1cb95d37
commit
e68bee9b84
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user