Skip to main content

Search and Top Navigation

#5006 assigned bug ()

Opened December 15, 2009 12:08PM UTC

Last modified August 19, 2014 12:19AM UTC

Sortable: incorrectly considers hidden elements as the clone element

Reported by: michalm Owned by: mikesherov
Priority: major Milestone: none
Component: ui.sortable Version: 1.7.2
Keywords: sortable, placeholder, Cc:
Blocked by: Blocking:
Description

Was recently working on a project when i came across some weird behaviour with draggables connected to sortables.

A simple demo is included. 5px border is to make the bug more visible.

What to look for:

1. The draggable is losing its size, watch for the floating border.

2. Dragging to the first column causes a second placeholder with size zero to appear in 'random' placec in the same sortable.

Fix:

Disabling the hidden sortables. In the demo:

$(".sortable:hidden").sortable('disable');

Comments:

Static sizing the elements fixes problem 2, but not 1.

Attachments (1)
Change History (5)

Changed December 15, 2009 12:12PM UTC by michalm comment:1

Tested in IE 8, Firefox 3.5.5, Chrome 3.0.195.38

Changed October 11, 2012 09:07PM UTC by scottgonzalez comment:2

milestone: TBD2.0.0

Changed October 24, 2012 12:48PM UTC by mikesherov comment:3

status: newopen

confirmed in chrome 22: http://jsfiddle.net/ExbdP/2/

to reproduce:

1. drag "drag me down" down to the first list and drop.

2. Notice that the element that gets added doesn't contain the text "drag me down".

3. Notice that while dragging, the text "drag me down" is multiline.

the problem goes away when the last line is uncommented.

Changed October 28, 2012 08:59PM UTC by mikesherov comment:4

summary: Draggables with connectToSortable showing strange behaviour when some of the sortables are hiddenDraggable: using connectToSortable shows strange behaviour when some of the sortables are hidden

Changed August 19, 2014 12:19AM UTC by mikesherov comment:5

component: ui.draggableui.sortable
keywords: draggable, sortable, placeholder, sizesortable, placeholder,
milestone: 2.0.0none
owner: → mikesherov
status: openassigned
summary: Draggable: using connectToSortable shows strange behaviour when some of the sortables are hiddenSortable: incorrectly considers hidden elements as the clone element