Revert "Revert "Update jQuery UI to 1.8.23""
[lhc/web/wiklou.git] / resources / jquery.ui / jquery.ui.mouse.js
index c7f37d2..e051055 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * jQuery UI Mouse 1.8.22
+ * jQuery UI Mouse 1.8.23
  *
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -45,9 +45,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) {