aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.mouse.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 6f95765f2..dc10d9401 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -47,9 +47,11 @@ $.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);
+ if ( this._mouseMoveDelegate ) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+ }
},
_mouseDown: function(event) {