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.
  • Loading branch information
scottgonzalez committed Mar 19, 2012
1 parent 99fd851 commit 94c6f9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/jquery.ui.mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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 94c6f9e

Please sign in to comment.