Skip to content

Commit

Permalink
Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mou…
Browse files Browse the repository at this point in the history
…seDestroy keeps mousemove and mouseup events bound.

(cherry picked from commit 94c6f9e)
  • Loading branch information
scottgonzalez committed Mar 19, 2012
1 parent 5e3ad8f commit a76366f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/jquery.ui.mouse.js
Expand Up @@ -45,6 +45,9 @@ $.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);
},

_mouseDown: function(event) {
Expand Down

0 comments on commit a76366f

Please sign in to comment.