r1818 - trunk/ui

r1818 - trunk/ui


Author: scott.gonzalez
Date: Tue Jan 27 17:21:50 2009
New Revision: 1818
Modified:
trunk/ui/ui.core.js
Log:
Mouse: Fixed #3552, reverted r1763: Let mouse events propagate.
Modified: trunk/ui/ui.core.js
==============================================================================
--- trunk/ui/ui.core.js    (original)
+++ trunk/ui/ui.core.js    Tue Jan 27 17:21:50 2009
@@ -412,6 +412,9 @@
    },
    _mouseDown: function(event) {
+        // don't let more than one widget handle mouseStart
+        if (event.originalEvent.mouseHandled) { return; }
+
        // we may have missed mouseup (out of window)
        (this._mouseStarted && this._mouseUp(event));
@@ -455,11 +458,7 @@
        // anymore, so this fix is needed
        ($.browser.safari || event.preventDefault());
-        // was changed to return true in rev 1000 because that allows the
-        // event to bubble - however, exactly that causes much pain for
-        // nested widgets, so we call stopPropagation(). Building a work-
-        // around for the above is much easier.
-        event.stopPropagation();
+        event.originalEvent.mouseHandled = true;
        return true;
    },