Bug Tracker

Modify

Ticket #2776 (closed bug: invalid)

Opened 5 years ago

Last modified 14 months ago

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:
Blocking: Blocked by:

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

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

Change History

comment:1 follow-up: ↓ 2 Changed 5 years ago by paul

  • Priority changed from major to minor

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

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

 http://dev.jqueryui.com

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.