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.9m7~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d;p=jquery-ui.git Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound. --- diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 64a081961..5e7744418 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -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) {