Opened 9 years ago

Last modified 4 years ago

#5006 assigned bug

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)

connectoToSortable.html (2.4 KB) - added by michalm 9 years ago.
Bug demo

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by michalm

Attachment: connectoToSortable.html added

Bug demo

comment:1 in reply to:  description Changed 9 years ago by michalm

Tested in IE 8, Firefox 3.5.5, Chrome 3.0.195.38

comment:2 Changed 6 years ago by Scott González

Milestone: TBD2.0.0

comment:3 Changed 6 years ago by mikesherov

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.

comment:4 Changed 6 years ago by mikesherov

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

comment:5 Changed 4 years ago by mikesherov

Component: ui.draggableui.sortable
Keywords: added; draggable size removed
Milestone: 2.0.0none
Owner: set to 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
Note: See TracTickets for help on using tickets.