Opened 13 years ago
Last modified 9 years ago
#4428 open bug
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: | [email protected]… | |
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)
Change History (13)
Changed 13 years ago by
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
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.
comment:3 Changed 13 years ago by
Milestone: | TBD → 1.7.2 |
---|
comment:4 Changed 13 years ago by
Milestone: | 1.7.2 → 1.8 |
---|
comment:5 Changed 11 years ago by
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.
comment:6 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:7 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | sortable works only with elements of the same height → Sortable: works only with elements of the same height |
comment:9 Changed 9 years ago by
Test case against master from #8621 - http://jsfiddle.net/tj_vantoll/j4Avu/.
comment:10 Changed 9 years ago by
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.
comment:11 Changed 9 years ago by
Possibly a duplicate of #5772 because both have to due with not being able to reorder when using the containment
option.
comment:12 Changed 9 years ago by
Summary: | Sortable: works only with elements of the same height → Sortable: Containment works only with elements of the same height |
---|
Another observation: showing the placeholder is calculated with the height of drag handler, not the entire dragged element.
That's problably the cause.