]> source.dussan.org Git - jquery-ui.git/commitdiff
core: fixed mouse plugin event binding - now binds events with the namespace this...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 29 May 2008 16:43:04 +0000 (16:43 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 29 May 2008 16:43:04 +0000 (16:43 +0000)
ui/source/ui.core.js

index f9b76aa4fd60ed66ceafe4d2f034019d61614592..722794bd33b9bb5ad55502d45eaed0f15ca56be1 100644 (file)
        $.ui.mouse = {\r
                mouseInit: function() {\r
                        var self = this;\r
-                       \r
-                       this.element.bind('mousedown.mouse', function(e) {\r
+               \r
+                       this.element.bind('mousedown.'+this.widgetName, function(e) {\r
                                return self.mouseDown(e);\r
                        });\r
                        \r
                // TODO: make sure destroying one instance of mouse doesn't mess with\r
                // other instances of mouse\r
                mouseDestroy: function() {\r
-                       this.element.unbind('.mouse');\r
+                       this.element.unbind('.'+this.widgetName);\r
                        \r
                        // Restore text selection in IE\r
                        ($.browser.msie\r
                                return self.mouseUp(e);\r
                        };\r
                        $(document)\r
-                               .bind('mousemove.mouse', this._mouseMoveDelegate)\r
-                               .bind('mouseup.mouse', this._mouseUpDelegate);\r
+                               .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)\r
+                               .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);\r
                        \r
                        return false;\r
                },\r
                \r
                mouseUp: function(e) {\r
                        $(document)\r
-                               .unbind('mousemove.mouse', this._mouseMoveDelegate)\r
-                               .unbind('mouseup.mouse', this._mouseUpDelegate);\r
+                               .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)\r
+                               .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);\r
                        \r
                        if (this._mouseStarted) {\r
                                this._mouseStarted = false;\r