From 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 19 Mar 2012 09:47:38 -0400 Subject: [PATCH] Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound. --- ui/jquery.ui.mouse.js | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.5