Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#2722 closed bug (fixed)

Draggable: click event shouldn't fire after dragging

Reported by: telega Owned by: paul
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description

"Click" event shouldn't fire when item is released after being dragged. Sample code:

<script src="jquery.js"></script>
<script src="jquery.dimensions.js"></script>
<script src="ui.mouse.js"></script>
<script src="ui.draggable.js"></script>
<script>
  $(document).ready(function() {
    $("#test").draggable()
              .click(function() { alert('click'); });
  });
</script>

<style>
  #test {
     width: 100px;
     height: 100px;
     background: lightblue;
   }
</style>

<div id="test"></div>

Change History (6)

comment:1 Changed 11 years ago by telega

The same thing for Resizables. I have a resizable image, wrapped in a link: <a href="the link"><img></a> When I'm done resizing image, click event is fired and causes the link to be executed, which is not expected behavior.

comment:2 Changed 11 years ago by paul

Status: newassigned

comment:3 Changed 11 years ago by paul

Priority: majorminor

comment:4 Changed 11 years ago by paul

Resolution: fixed
Status: assignedclosed

Fixed in r5415!

comment:5 Changed 11 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:6 Changed 10 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.