Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#3455 closed bug (notabug)

draggable clone helper appears in wrong position

Reported by: richwild Owned by: paul
Priority: major Milestone:
Component: ui.draggable Version: 1.6rc1
Keywords: draggable clone wrong position helper incorrect offset Cc:
Blocked by: Blocking:



Having a strange problem with draggable divs.

I have a div containing a series of floated elements. These elements are all floated left, with each odd element clearing the previous, so that they're arranged in a 2-column display down the page.

I make each one draggable, but on doing so, when I drag the elements, the cloned helper that appears only ever appears positioned where the first draggable is (e.g. the upper leftmost element).

This is fine for the first element, but not as expected for the others. Dragging a later element shows its clone positioned at the first element with a huge offset from where the actual mouse is.

Have tried this with 1.6rc1 and stable 1.5.1 - both show same behaviour.

Occurs in FF3.01, IE7 and Google Chrome

Here's example code:


$(document).ready(function() {
	$(".dragWidget").each(function() {
		$(this).draggable({helper: 'clone'});


        	<div class="dragWidget"><div class="column186Left">widget 1</div></div>
            <div class="dragWidget"><div class="column186Right">widget 2</div></div>
            <div class="dragWidget"><div class="column186Left">widget 3</div></div>
            <div class="dragWidget"><div class="column186Right">widget 4</div></div>


.column186Left {
	width: 186px;
	margin: 0 5px 4px 0;
	float: left;

.column186Right {
	width: 186px;
	margin: 0 0 0 0;
	float: left;

Change History (3)

comment:1 Changed 14 years ago by richwild

Apologies, it was an error in my code. Sorry for inconvenience, please close.

comment:2 Changed 14 years ago by paul

Resolution: invalid
Status: newclosed

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.