]> source.dussan.org Git - jquery-ui.git/commitdiff
Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps...
authorScott González <scott.gonzalez@gmail.com>
Mon, 19 Mar 2012 13:47:38 +0000 (09:47 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 19 Mar 2012 13:47:59 +0000 (09:47 -0400)
(cherry picked from commit 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d)

ui/jquery.ui.mouse.js

index a0068759ff348ddce14b1fa825f6c25f7636503d..1767de8fb0a33f61374281438189f6d6a0ddf95d 100644 (file)
@@ -45,6 +45,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) {