Sortable events bug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sortable events bug

ziadoz

If you have a link within a sortable and you use it to begin dragging
asortable and then you release your mouse cursor on that same link
when you drop the sortable, it seems to fire that link.

This is using ui.core.js, ui.draggable.js and ui.sortable.js from the
latest SVN commits (suggested by Paul Bakaus to fix my previous
sortables problem: http://groups.google.com/group/jquery-ui/browse_thread/thread/ad863e1a0f173d1e).
The same behaviour doesn't seem to exist in UI 1.5.2.

Sample code (Try dragging "Google Item"):

<html>
        <head>
        </head>
        <style>
        .sortable { list-style: none; }
        .sortable a { width: 300px; height: 30px; line-height: 30px;
display: block; color: white; background: blue; color: white; }
        </style>
        <body>
                <ul class="sort" id="list_1">
                        <li id="i_1" class="sortable"><a href="http://
www.google.co.uk">Item Google</a></li>
                        <li id="i_2" class="sortable"><a href="#">Item</a></li>
                        <li id="i_3" class="sortable"><a href="#">Item</a></li>
                        <li id="i_4" class="sortable"><a href="#">Item</a></li>
                </ul>

                <script type="text/javascript" src="jquery-1.2.6.packed.js"></
script>
                <script type="text/javascript" src="ui.core.js"></script>
                <script type="text/javascript" src="ui.draggable.js"></script>
                <script type="text/javascript" src="ui.sortable.js"></script>

                <script type="text/javascript">
                $(document).ready(function() {
                        $('.sort').sortable();
                });
                </script>
        </body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Sortable events bug

Paul Bakaus
Hey there,

this looks like a bug - could you maybe file a bug report at http://ui.jquery.com/bugs/newticket ?

Thanks a lot,
Paul

On Wed, Jul 23, 2008 at 1:19 PM, ziadoz <[hidden email]> wrote:

If you have a link within a sortable and you use it to begin dragging
asortable and then you release your mouse cursor on that same link
when you drop the sortable, it seems to fire that link.

This is using ui.core.js, ui.draggable.js and ui.sortable.js from the
latest SVN commits (suggested by Paul Bakaus to fix my previous
sortables problem: http://groups.google.com/group/jquery-ui/browse_thread/thread/ad863e1a0f173d1e).
The same behaviour doesn't seem to exist in UI 1.5.2.

Sample code (Try dragging "Google Item"):

<html>
       <head>
       </head>
       <style>
       .sortable {                             list-style: none; }
       .sortable a {                   width: 300px; height: 30px; line-height: 30px;
display: block; color: white; background: blue; color: white; }
       </style>
       <body>
               <ul class="sort" id="list_1">
                       <li id="i_1" class="sortable"><a href="http://
www.google.co.uk">Item Google</a></li>
                       <li id="i_2" class="sortable"><a href="#">Item</a></li>
                       <li id="i_3" class="sortable"><a href="#">Item</a></li>
                       <li id="i_4" class="sortable"><a href="#">Item</a></li>
               </ul>

               <script type="text/javascript" src="jquery-1.2.6.packed.js"></
script>
               <script type="text/javascript" src="ui.core.js"></script>
               <script type="text/javascript" src="ui.draggable.js"></script>
               <script type="text/javascript" src="ui.sortable.js"></script>

               <script type="text/javascript">
               $(document).ready(function() {
                       $('.sort').sortable();
               });
               </script>
       </body>
</html>





--
Paul Bakaus
UI Architect
--
http://paulbakaus.com
http://www.linkedin.com/in/paulbakaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Sortable events bug

ziadoz

Hi Paul,

I've filed a report: http://ui.jquery.com/bugs/ticket/3132

Hope I put the right version number etc.

Cheers.


On Jul 23, 7:12 pm, "Paul Bakaus" <[hidden email]> wrote:

> Hey there,
>
> this looks like a bug - could you maybe file a bug report athttp://ui.jquery.com/bugs/newticket?
>
> Thanks a lot,
> Paul
>
>
>
> On Wed, Jul 23, 2008 at 1:19 PM, ziadoz <[hidden email]> wrote:
>
> > If you have a link within a sortable and you use it to begin dragging
> > asortable and then you release your mouse cursor on that same link
> > when you drop the sortable, it seems to fire that link.
>
> > This is using ui.core.js, ui.draggable.js and ui.sortable.js from the
> > latest SVN commits (suggested by Paul Bakaus to fix my previous
> > sortables problem:
> >http://groups.google.com/group/jquery-ui/browse_thread/thread/ad863e1...
> > ).
> > The same behaviour doesn't seem to exist in UI 1.5.2.
>
> > Sample code (Try dragging "Google Item"):
>
> > <html>
> >        <head>
> >        </head>
> >        <style>
> >        .sortable {                             list-style: none; }
> >        .sortable a {                   width: 300px; height: 30px;
> > line-height: 30px;
> > display: block; color: white; background: blue; color: white; }
> >        </style>
> >        <body>
> >                <ul class="sort" id="list_1">
> >                        <li id="i_1" class="sortable"><a href="http://
> >www.google.co.uk">Item Google</a></li>
> >                        <li id="i_2" class="sortable"><a
> > href="#">Item</a></li>
> >                        <li id="i_3" class="sortable"><a
> > href="#">Item</a></li>
> >                        <li id="i_4" class="sortable"><a
> > href="#">Item</a></li>
> >                </ul>
>
> >                <script type="text/javascript"
> > src="jquery-1.2.6.packed.js"></
> > script>
> >                <script type="text/javascript" src="ui.core.js"></script>
> >                <script type="text/javascript"
> > src="ui.draggable.js"></script>
> >                <script type="text/javascript"
> > src="ui.sortable.js"></script>
>
> >                <script type="text/javascript">
> >                $(document).ready(function() {
> >                        $('.sort').sortable();
> >                });
> >                </script>
> >        </body>
> > </html>
>
> --
> Paul Bakaus
> UI Architect
> --http://paulbakaus.comhttp://www.linkedin.com/in/paulbakaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Sortable events bug

romero83
In reply to this post by ziadoz
You can use:

start: function(event, ui) {
        $(link selector).click(function() { return false; });
},
stop: function(event, ui) {
        setTimeout(function() {
                $(link selector).unbind();
        }, 50);
}

ziadoz wrote
If you have a link within a sortable and you use it to begin dragging
asortable and then you release your mouse cursor on that same link
when you drop the sortable, it seems to fire that link.

This is using ui.core.js, ui.draggable.js and ui.sortable.js from the
latest SVN commits (suggested by Paul Bakaus to fix my previous
sortables problem: http://groups.google.com/group/jquery-ui/browse_thread/thread/ad863e1a0f173d1e).
The same behaviour doesn't seem to exist in UI 1.5.2.

Sample code (Try dragging "Google Item"):

<html>
        <head>
        </head>
        <style> .sortable { list-style: none; } .sortable a { width: 300px; height: 30px; line-height: 30px; display: block; color: white; background: blue; color: white; } </style>        <body>
                <ul class="sort" id="list_1">
                        <li id="i_1" class="sortable"><a href="http:// www.google.co.uk">Item Google</li>
                        <li id="i_2" class="sortable">Item</li>
                        <li id="i_3" class="sortable">Item</li>
                        <li id="i_4" class="sortable">Item</li>
                </ul>

                <script type="text/javascript" src="jquery-1.2.6.packed.js"></ script> <script type="text/javascript" src="ui.core.js"></script>                <script type="text/javascript" src="ui.draggable.js"></script>                <script type="text/javascript" src="ui.sortable.js"></script>
                <script type="text/javascript"> $(document).ready(function() { $('.sort').sortable(); }); </script>        </body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to jquery-ui-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---