Search and Top Navigation
#9314 closed bug (fixed)
Opened May 19, 2013 11:15AM UTC
Closed November 01, 2013 08:17PM UTC
Last modified May 21, 2014 01:20PM UTC
Sortable: Items cannot be dragged directly into bottom position
Reported by: | BenjaminRH | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.sortable | Version: | 1.10.3 |
Keywords: | regression | Cc: | |
Blocked by: | Blocking: |
Description
With two or more connected sortables, items cannot be dragged straight to the bottom of a connected sortable. If the item is dragged to the top or middle of the sortable, it can then be dragged to the bottom.
Further, once an item has been "introduced" to a connected sortable (i.e. dragged somewhere and triggered a placeholder, but not dropped), it can be dragged (but not dropped) back to the first sortable, and then dragged straight to the bottom of the connected one.
Attachments (0)
Change History (19)
Changed May 19, 2013 09:07PM UTC by comment:1
status: | new → open |
---|---|
summary: | Items can't be dragged to the bottom of connected sortables without being dragged somewhere else in the connected sortable first → Sortable: Items cannot be dragged directly into bottom position |
version: | 1.9.2 → 1.10.3 |
Changed June 10, 2013 07:46PM UTC by comment:4
keywords: | → regression |
---|
Per #9370 this was a regression introduced in 1.10.2.
Changed June 18, 2013 02:31AM UTC by comment:6
Another good test case from dylanpyle in #9381: http://jsfiddle.net/VNZW8/. It looks like the placeholder is being put in the first position when it should be in the last one.
Changed June 18, 2013 02:33AM UTC by comment:7
Guessing this was caused by this commit but haven't confirmed that yet: https://github.com/jquery/jquery-ui/commit/89473f6557662d905a63faa3ae3520bf3715a7e8.
Changed June 18, 2013 07:26AM UTC by comment:8
Replying to [comment:6 tj.vantoll]:
Another good test case from dylanpyle in #9381: http://jsfiddle.net/VNZW8/. It looks like the placeholder is being put in the first position when it should be in the last one.
This certainly isn't happening all the time though. My test case and other website with this bug don't place the placeholder in the first position. Are you sure that's a duplicate?
Changed June 18, 2013 09:47PM UTC by comment:9
I have a similar issue. I have a sortable parent list that may or may not have sortable sub items. These sub items can be moved from one parent item to another. If you want to move a sub item to an empty parent item you can't without first sorting over other sub items (if there are any). Here's the jsfiddle http://jsfiddle.net/ZwaT3/
I found that the following if statement in the sortable widget _contactContainers function seems to be the cause of the issue.
if(this.currentContainer === this.containers[innermostIndex]) { return; }
(In 10.2 this is around ln 890 in the jquery.ui.sortable.js file and ln 4352 in jquery-ui.js)
This if statement was added by commit https://github.com/jquery/jquery-ui/commit/89473f6557662d905a63faa3ae3520bf3715a7e8 in relation to ticket #8792.
Changed June 19, 2013 12:19AM UTC by comment:10
Replying to [comment:8 BenjaminRH]:
Replying to [comment:6 tj.vantoll]: > Another good test case from dylanpyle in #9381: http://jsfiddle.net/VNZW8/. It looks like the placeholder is being put in the first position when it should be in the last one. This certainly isn't happening all the time though. My test case and other website with this bug don't place the placeholder in the first position. Are you sure that's a duplicate?
I'm pretty positive that it has the same root cause (i.e. the same commit caused the issue), but from what you said this does sound like a separate issue. I'm guessing if one is fixed the other will be addressed as well, but to be safe I reopened #9381.
Thanks.
Changed November 01, 2013 08:17PM UTC by comment:11
resolution: | → fixed |
---|---|
status: | open → closed |
Sortable: Adjust itemWithLeastDistance algorithm in _contactContainers to properly handle dragging items to the beginning and ends of lists. Fixes #9314 - Sortable: Items cannot be dragged directly into bottom position. Fixes #9381 - Sortable: Connected list placeholders have an inaccurate initial position
Changeset: 601ad962e0a417bb369378ed7704a0b493eac365
Changed November 01, 2013 08:19PM UTC by comment:12
milestone: | none → 1.11.0 |
---|
Changed December 09, 2013 01:59PM UTC by comment:13
#9607 is a duplicate of this ticket.
Changed January 26, 2014 06:14AM UTC by comment:14
I'm seeing this same behavior as well, and it's very frustrating. Just some encouragement here to let you know this fix is very much anticipated.
Thanks.
Changed January 27, 2014 09:59PM UTC by comment:15
#9773 is a duplicate of this ticket.
Changed February 24, 2014 12:29PM UTC by comment:16
I found when this bug happened.
In method _contactContainers finding itemWithLeastDistance (closest item from current dragged item) and this.direction (where need set placeholder after or before itemWithLeastDistance).
Reason - wrong direction, because on over sortable first time all inner items have height 0.
Changed May 15, 2014 01:05PM UTC by comment:17
_comment0: | Any news on this issue? I'm experiencing this issue, but didn't couldn't find an answer to fix it in the comments. Anyone knows of an update coming out in a near future - or can direct me to a something that will fix this issue? Thanks in advance. → 1400159190760495 |
---|
Any news on the subject? I'm experiencing this issue, but didn't seem to find an answer to fix it, in the comments here. Anyone knows of an update coming out in a near future - or can direct me to a something that will fix this issue? Thanks in advance.
Changed May 15, 2014 02:36PM UTC by comment:18
Replying to [comment:17 dnlmzw]:
Any news on the subject? I'm experiencing this issue, but didn't seem to find an answer to fix it, in the comments here. Anyone knows of an update coming out in a near future - or can direct me to a something that will fix this issue? Thanks in advance.
A fix for this is included in 1.11. You can try out the beta release: http://blog.jqueryui.com/2014/04/jquery-ui-1-11-0-beta-1/
Changed May 21, 2014 01:20PM UTC by comment:19
#10055 is a duplicate of this ticket.
Reduced and confirmed against master: http://jsfiddle.net/tj_vantoll/NjBLd/. You cannot drag an item from one connected sortable directly into the bottom position of another. I've played with various configurations of height/padding/margin and the behavior seems to occur regardless.