Bug Tracker

Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#2776 closed bug (invalid)

Sortables - Dragged Item Position Skewed on Right-Click

Reported by: wjchristenson2 Owned by: paul
Priority: minor Milestone: 1.2.4
Component: ui Version: 1.2.3
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)

test.rar (2.3 KB) - added by wjchristenson2 11 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by paul

Priority: majorminor

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?

comment:2 in reply to:  1 Changed 11 years ago by wjchristenso

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 11 years ago by wjchristenson2

Attachment: test.rar added

comment:3 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

This should be filed in the UI bug tracker if still relevant.

http://dev.jqueryui.com

Note: See TracTickets for help on using tickets.