]> source.dussan.org Git - jquery-ui.git/commitdiff
Mouse: Changed mouseHandled check to a local var rather than using originalEvent... 413/head
authorkborchers <k_borchers@yahoo.com>
Tue, 2 Aug 2011 13:36:22 +0000 (08:36 -0500)
committerkborchers <k_borchers@yahoo.com>
Tue, 2 Aug 2011 13:36:22 +0000 (08:36 -0500)
ui/jquery.ui.mouse.js

index 054e5dc63ac39fa27f5c9b84e937ea34045caedf..3e6ead8cd76c595ff340b1d63873f0323896c808 100644 (file)
  */
 (function( $, undefined ) {
 
+var mouseHandled = false;
+$( document ).mouseup( function( e ) {
+       mouseHandled = false;
+});
+
 $.widget("ui.mouse", {
        version: "@VERSION",
        options: {
@@ -45,9 +50,7 @@ $.widget("ui.mouse", {
 
        _mouseDown: function(event) {
                // don't let more than one widget handle mouseStart
-               // TODO: figure out why we have to use originalEvent
-               event.originalEvent = event.originalEvent || {};
-               if (event.originalEvent.mouseHandled) { return; }
+               if( mouseHandled ) { return };
 
                // we may have missed mouseup (out of window)
                (this._mouseStarted && this._mouseUp(event));
@@ -93,7 +96,8 @@ $.widget("ui.mouse", {
                        .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
 
                event.preventDefault();
-               event.originalEvent.mouseHandled = true;
+               
+               mouseHandled = true;
                return true;
        },