]> source.dussan.org Git - jquery-ui.git/commitdiff
Mouse: Fixed #3552, reverted r1763: Let mouse events propagate.
authorScott González <scott.gonzalez@gmail.com>
Wed, 28 Jan 2009 01:21:50 +0000 (01:21 +0000)
committerScott González <scott.gonzalez@gmail.com>
Wed, 28 Jan 2009 01:21:50 +0000 (01:21 +0000)
ui/ui.core.js

index 70fab6e26d4b6f63cd67b153b11d8b856102fdc9..a6e76436d3a9b2e95fbcdf95150d402b18a3b6ca 100644 (file)
@@ -412,6 +412,9 @@ $.ui.mouse = {
        },
 
        _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 @@ $.ui.mouse = {
                // 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;
        },