I have tried the same fix to my local copy of jQuery UI 1.6rc6 but it
did not work. See my code below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
        <title>Dragging Trigger</title>
                <script type="text/javascript" language="JavaScript"
src="jquery.js"></script>
                <script type="text/javascript" language="JavaScript"
src="jquery.ui.all.js"></script>
                <script type="text/javascript" language="JavaScript">
                        jQuery(document).ready(function() {

                                jQuery("#myDiv").mousedown(function(ev) {

                                        target = jQuery(ev.target);

                                        target.draggable({
                                                helper: "clone",
                                                start: function()
                                                {
                                                        console.log("drag 
start");
                                                },
                                                stop: function()
                                                {
                                                        
jQuery(this).draggable("destroy");
                                                }
                                        }).trigger("mousedown.draggable", [ev]);

                                });

                                jQuery("#fireDragDiv").bind("click", 
function(eventData) {
                                        
jQuery('#draggableDiv').triggerHandler("mousedown", eventData);
                                });

                                jQuery("#draggableDiv").bind("mousedown", 
function() { console.log
("Mouse down handler was fired " + new Date().getTime()); });

                                jQuery("#draggableDiv").draggable({ helper: 
"clone" });

                        });
                </script>
                <style type="text/css">
                        #myDiv .drag-me
                        {
                                margin: 5px;
                                width: 20px;
                                height: 20px;
                                background-color: red;
                        }

                        #fireDragDiv
                        {
                                width: 50px;
                                height: 50px;
                                background-color: blue;
                        }

                        #draggableDiv
                        {
                                width: 50px;
                                height: 50px;
                                background-color: green;
                        }
                </style>
        </head>
    <body>
                <div id="myDiv">
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                        <div class="drag-me"></div>
                </div>
                <div id="fireDragDiv">

                </div>
                <div id="draggableDiv">

                </div>
        </body>
</html>

Could you forward me details of your fix please?

On Feb 5, 9:38 am, BillyRayPreachersSon
<[email protected]> wrote:
> Great, thanks Scott.
>
> I'd put a similar fix in my local copy, but it's good to know I'll be
> able to use an unmodified UI (core, at least) when 1.6 'proper' is
> released.
>
> Dan
>
> On Feb 5, 2:33 am, Scott González <[email protected]> wrote:
>
> > Fixed.
>
> > On Feb 4, 8:55 pm, Scott González <[email protected]> wrote:
>
> > > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to