aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 6f95765f2..a08566b90 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -3,7 +3,7 @@
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
- * Dual licensed under the MIT or GPL Version 2 licenses.
+ * Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
@@ -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) {