Skip to content
Permalink
Browse files

Mouse: Don't try to unbind delegated event handlers if they don't exi…

…st. Fixes #8416 - Draggable breaks during drag if any other draggable is removed or destroyed.
  • Loading branch information...
scottgonzalez committed Jul 31, 2012
1 parent 7e1cb95 commit e68bee9b84b16ee8a757a7a1f44d93f4ba78c656
Showing with 5 additions and 3 deletions.
  1. +5 −3 ui/jquery.ui.mouse.js
@@ -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) {

0 comments on commit e68bee9

Please sign in to comment.
You can’t perform that action at this time.