Skip to main content

Search and Top Navigation

#3455 closed bug (notabug)

Opened September 19, 2008 02:56PM UTC

Closed September 20, 2008 03:37PM UTC

Last modified October 11, 2012 09:15PM UTC

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:
Description

Hi,

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 0.2.149.30

Here's example code:

JS:

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

XHTML:

        	<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>

CSS:

.column186Left {
	width: 186px;
	margin: 0 5px 4px 0;
	float: left;
	background-color:#FF0000;
	clear:left;
}

.column186Right {
	width: 186px;
	margin: 0 0 0 0;
	float: left;
	background-color:#FF0000;
}
Attachments (0)
Change History (3)

Changed September 20, 2008 09:50AM UTC by richwild comment:1

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

Changed September 20, 2008 03:37PM UTC by paul comment:2

resolution: → invalid
status: newclosed

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted