]> source.dussan.org Git - jquery-ui.git/commitdiff
Revert "Mouse: Changed mouseHandled check to a local var rather than using originalEv...
authorScott González <scott.gonzalez@gmail.com>
Mon, 1 Aug 2011 18:17:38 +0000 (14:17 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 1 Aug 2011 18:17:38 +0000 (14:17 -0400)
This reverts commit 7eda94a8c916760de4093df85f58cc694838b52b.

ui/jquery.ui.mouse.js

index 2fb1389f2b8ba652a23ccdff2aa675a3ab121e17..7e38c69c444584a3f94a989071dc9b364f6f5ae3 100644 (file)
  */
 (function( $, undefined ) {
 
-var mouseHandled = false;
-$(document).mousedown(function(e) {
-       mouseHandled = false;
-});
-
 $.widget("ui.mouse", {
        options: {
                cancel: ':input,option',
@@ -49,7 +44,9 @@ $.widget("ui.mouse", {
 
        _mouseDown: function(event) {
                // don't let more than one widget handle mouseStart
-               if(mouseHandled) {return};
+               // TODO: figure out why we have to use originalEvent
+               event.originalEvent = event.originalEvent || {};
+               if (event.originalEvent.mouseHandled) { return; }
 
                // we may have missed mouseup (out of window)
                (this._mouseStarted && this._mouseUp(event));
@@ -95,8 +92,7 @@ $.widget("ui.mouse", {
                        .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
 
                event.preventDefault();
-               
-               mouseHandled = true;
+               event.originalEvent.mouseHandled = true;
                return true;
        },