From a76366f8fc731ec6946d9f6940c8a03040e31d23 Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 19 Mar 2012 09:47:38 -0400 Subject: Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound. (cherry picked from commit 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d) --- ui/jquery.ui.mouse.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui') 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) { -- cgit v1.2.3