From: Scott González Date: Mon, 19 Mar 2012 13:47:38 +0000 (-0400) Subject: Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps... X-Git-Tag: 1.8.19~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a76366f8fc731ec6946d9f6940c8a03040e31d23;p=jquery-ui.git Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound. (cherry picked from commit 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d) --- diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index a0068759f..1767de8fb 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -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) {