diff options
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r-- | ui/ui.core.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 877b0d023..1940385d1 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -345,9 +345,16 @@ $.ui.mouse = { _mouseInit: function() { var self = this; - this.element.bind('mousedown.'+this.widgetName, function(e) { - return self._mouseDown(e); - }); + this.element + .bind('mousedown.'+this.widgetName, function(e) { + return self._mouseDown(e); + }) + .bind('click.'+this.widgetName, function(e) { + if(self._preventClickEvent) { + self._preventClickEvent = false; + return false; + } + }); // Prevent text selection in IE if ($.browser.msie) { @@ -437,6 +444,7 @@ $.ui.mouse = { if (this._mouseStarted) { this._mouseStarted = false; + this._preventClickEvent = true; this._mouseStop(e); } |