aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-03-19 09:47:38 -0400
committerScott González <scott.gonzalez@gmail.com>2012-03-19 09:47:38 -0400
commit94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d (patch)
tree4643124773219dbfe331ebf3df54889d0bb64245
parent99fd8511ed4098a4cbf6c66999ef4df0bd8280be (diff)
downloadjquery-ui-94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d.tar.gz
jquery-ui-94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d.zip
Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound.
-rw-r--r--ui/jquery.ui.mouse.js3
1 files changed, 3 insertions, 0 deletions
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) {