I've created a ticket for this: http://dev.jqueryui.com/ticket/4061
Thanks for the test case. On Feb 3, 2:40 pm, BillyRayPreachersSon <[email protected]> wrote: > Last night I upgraded from jQuery 1.2.6 and UI 1.5.3 to jQuery 1.3.1 > and UI 1.6rc6 without too many problems at all (which is fantastic!). > > The only problem I've found is when firing a mousedown event on an > element that has draggable (or potentially, any mousedown) behaviour > attached. This now throws an error on the following line of > $.ui.mouse._mouseDown, due to 'originalEvent' not being present: > > if (event.originalEvent.mouseHandled) { return; } > > Here's a cut-down test harness which illustrates the problem nicely: > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > <head> > <title>jQuery Event Test</title> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> > > <script type="text/javascript" src="assets/js/jquery-1.3.1.js"></ > script> > <script type="text/javascript" src="assets/js/jquery-ui- > personalized-1.6rc6.js"></script><!-- core, mouse, draggable, > resizable --> > > <script type="text/javascript"> > jQuery(function() { > jQuery('#mouseFireManual').bind('click', > function(eventData) { > > jQuery('#draggableDiv').triggerHandler('mousedown', eventData); > }); > > jQuery('#draggableDiv').bind('mousedown', > listenForMouseDown); > > jQuery('#draggableDiv').draggable({}); > }); > > function listenForMouseDown() { > document.title = 'Mouse down handler was fired ' + > new Date > ().getTime(); > } > </script> > </head> > > <body> > <div id="mouseFireManual">Fire mouse down event</div> > <br /> > > <div id="draggableDiv">This DIV is draggable</div> > </body> > </html> > > If you click the 'Fire mouse down event', you'll get an error, but you > drag 'draggableDiv' without any problem. > > Switching in jQuery 1.2.6 and UI 1.5.3 with no other code changes, and > the error goes away. > > Is this something I should report as a bug, or is this expected > behaviour with the new event model? > > Thanks! > > Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
