Skip to main content

Search and Top Navigation

#4428 open bug ()

Opened April 02, 2009 06:53PM UTC

Last modified March 23, 2013 02:25AM UTC

Sortable: Containment works only with elements of the same height

Reported by: mg Owned by:
Priority: major Milestone: 2.0.0
Component: ui.sortable Version: 1.7.1
Keywords: Cc: mg@artigo.pl
Blocked by: Blocking:
Description

When sorted elements differ in height many problems appear then trying to drop an element in correct place:

Most annoying is then trying to drop element to end of the list when approaching from below.

in 90% of tries it drops above the last element instead of the list end.

Another problem is incorrect height of placeholder under IE7, but I think it has already been reported.

Attachments (1)
  • drop.png (26.9 KB) - added by mg April 02, 2009 06:53PM UTC.
Change History (12)

Changed April 02, 2009 07:00PM UTC by mg comment:1

Another observation: showing the placeholder is calculated with the height of drag handler, not the entire dragged element.

That's problably the cause.

Changed April 03, 2009 07:39AM UTC by mg comment:2

Live demo of the bug can be seen here:

http://nettuts.s3.amazonaws.com/127_iNETTUTS/demo/index.html

Try to drop an element at the bottom when approaching from below. Most of the times it won't be possible until we reach 3/4 of the last element or it will be place above the last element.

The demo shows also IE7 placeholder BUG - just try it in IE7.

Changed May 07, 2009 10:59AM UTC by jzaefferer comment:3

milestone: TBD1.7.2

Changed May 07, 2009 01:22PM UTC by jzaefferer comment:4

milestone: 1.7.21.8

Changed May 18, 2011 07:43PM UTC by k_borchers comment:5

_comment0: I believe I have fixed this bug here https://github.com/jquery/jquery-ui/pull/307. Does not have to do with different heights of elements but rather the way intersections with the sortables were being calculated.1305747858450590

I believe I have fixed this bug here https://github.com/jquery/jquery-ui/pull/307. Does not have to do with different heights of elements but rather the way intersections with the sortables were being calculated.

Does not fix IE7 placeholder issue since that should be filed separately.

Changed October 11, 2012 02:54PM UTC by scottgonzalez comment:6

milestone: 1.9.02.0.0

Changed October 25, 2012 01:00AM UTC by petersendidit comment:7

status: newopen
summary: sortable works only with elements of the same heightSortable: works only with elements of the same height

Changed February 09, 2013 02:47AM UTC by tj.vantoll comment:8

#8621 is a duplicate of this ticket.

Changed February 09, 2013 02:49AM UTC by tj.vantoll comment:9

Test case against master from #8621 - http://jsfiddle.net/tj_vantoll/j4Avu/.

Changed March 04, 2013 03:30AM UTC by tj.vantoll comment:10

Reduced the test case against master http://jsfiddle.net/tj_vantoll/j4Avu/1/. Basically all you need is to have sortables of different heights and

containment: 'parent'
to recreate the issue.

Changed March 16, 2013 06:57PM UTC by tj.vantoll comment:11

Possibly a duplicate of #5772 because both have to due with not being able to reorder when using the

containment
option.

Changed March 23, 2013 02:25AM UTC by tj.vantoll comment:12

summary: Sortable: works only with elements of the same heightSortable: Containment works only with elements of the same height