Skip to main content

Search and Top Navigation

Ticket #3552: nested-mouse.patch


File nested-mouse.patch, 0.9 KB (added by scottgonzalez, January 27, 2009 02:27PM UTC)
Index: /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.core.js
===================================================================
--- /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.core.js	(revision 1801)
+++ /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.core.js	(working copy)
@@ -412,6 +412,8 @@
 	},
 
 	_mouseDown: function(event) {
+		if (event.originalEvent.mouseHandled) { return; }
+		
 		// we may have missed mouseup (out of window)
 		(this._mouseStarted && this._mouseUp(event));
 
@@ -455,11 +457,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;
 	},

Download in other formats:

Original Format