#2776 closed bug (fixed)
Sortables - Dragged Item Position Skewed on Right-Click
Reported by: | wjchristenson2 | Owned by: | paul |
---|---|---|---|
Priority: | minor | Milestone: | 1.5 |
Component: | ui.sortable | Version: | 1.5b4 |
Keywords: | Sortable | Cc: | |
Blocked by: | Blocking: |
Description
Browser: IE 7 jQuery: 1.2.4a jQuery UI: 1.5b2 js: ui.sortable.js
When you drag a sortable item over another sortable item's drag handle and right click, the sortable item you were dragging is dropped but not in the placeholder (correct location). At this point the placeholder is still at the original location of the dragged item and the dragged item is dropped where you right-clicked.
$(document).ready(function(){ $("#zone_0").sortable({ items: 'div.wf_widget', handle: 'div.wf_widget_header', revert: false, scroll: true, placeholder: 'wf_widget_dropcue', connectWith: $('div.wf_zone'), opacity: 0.7, stop: function() { stopSort(); }, dropOnEmpty: true, helper: function() { return $("#helper").clone().show(); }, zIndex: 10000 }); $("#zone_1").sortable({ items: 'div.wf_widget', handle: 'div.wf_widget_header', revert: false, scroll: true, placeholder: 'wf_widget_dropcue', connectWith: $('div.wf_zone'), opacity: 0.7, stop: function() { stopSort(); }, dropOnEmpty: true, helper: function() { return $("#helper").clone().show(); }, zIndex: 10000 }); });
<div> <table> <tr><td>Zone 0:</td><td>Zone 1:</td></tr> <tr> <td style="vertical-align: top;"> <%--zone 0--%> <div id="zone_0" class="wf_zone"> <%--widget 0--%> <div id="widget_0" class="wf_widget"> <div class="wf_widget_header">widget 0</div> <div class="wf_widget_content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla laoreet euismod odio. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum dictum tortor at sapien. Aliquam erat volutpat. Duis vel metus at magna sodales suscipit. Integer risus diam, dignissim vitae, ornare ut, vestibulum ut, augue. Nam sollicitudin congue lectus. Curabitur lacus. Integer est. Morbi vel sapien quis pede tempus dignissim. Etiam at libero eu sem posuere aliquam. Sed id nibh. Vestibulum consequat dui vel orci.</div> </div> <%--widget 1--%> <div id="widget_1" class="wf_widget"> <div class="wf_widget_header">widget 1</div> <div class="wf_widget_content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla laoreet euismod odio.</div> </div> </div> </td> <td style="vertical-align: top;"> <%--zone 1--%> <div id="zone_1" class="wf_zone"> <%--widget 2--%> <div id="widget_2" class="wf_widget"> <div class="wf_widget_header">widget 2</div> <div class="wf_widget_content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla laoreet euismod odio.</div> </div> </div> </td> </tr> </table> </div> <div id="helper" style="border: solid 1px red;display: none;">helper</div>
Attachments (1)
Change History (7)
comment:1 follow-up: 2 Changed 15 years ago by
Priority: | major → minor |
---|
comment:2 Changed 15 years ago by
Replying to paul:
I couldn't reproduce the issue on http://dev.jquery.com/view/trunk/ui/demos/ui.sortable.html. Can you check if it happens here, too?
I also could not reproduce the issue on the demo link. However I can reproduce it consistently on the code attached. It may be related to a handle and/or a helper (I'm using both in the example).
Changed 15 years ago by
comment:4 Changed 15 years ago by
Component: | ui.core → ui.sortable |
---|---|
Version: | 1.2.3 → 1.5b4 |
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be fixed with 1.6 (branches/1.6/ui.sortable.js).
comment:6 Changed 14 years ago by
Milestone: | → 1.5 |
---|
I couldn't reproduce the issue on http://dev.jquery.com/view/trunk/ui/demos/ui.sortable.html. Can you check if it happens here, too?