Ticket #8114 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Sortable "Connect Lists" demo doesn't allow dropping as last element

Reported by: 2of11 Owned by: rdworth
Priority: minor Milestone: 1.8.18
Component: [meta] ui.demos Version: 1.8.17
Keywords: Cc:
Blocking: Blocked by:

Description

I've reproduced this on Chrome and Safari (most up-to-date versions as of now) on my Mac:

In this example:  http://jqueryui.com/demos/sortable/#connect-lists

Take one element from the first list and move it straight down, then across and place it as the last element into the new list. If you do this without hovering over an element in the second list then you will not be able to place that element. However, if you moved over any element in the target list then you can in fact place the element at the bottom of the list.

Given the simplicity of the demos (hard to get something wrong there), I thought it better to put this into the ui.droppable category rather than the ui.demos category, but feel free to move the ticket if I misplaced it.

Change History

comment:1 Changed 2 years ago by scott.gonzalez

  • Component changed from ui.droppable to ui.sortable

comment:2 Changed 2 years ago by rdworth

  • Owner set to rdworth
  • Status changed from new to assigned
  • Component changed from ui.sortable to [meta] ui.demos

This behavior is as designed. When you take an element down and then straight right to place it below item 5, you're not placing it as the last item in the list, you're placing it *below* the list, and because it has yet to be dragged over a connected list, it's still set to drop as the last item in the original list. The difference you've noted is that if the item is first dragged over the container, a space is made for it, because the container is expecting it. The behavior (and logic) is lot easier to see with borders around each sortable container  http://jsbin.com/unafef/ . I don't think any change should be made in sortable but the workaround is to add some padding to the bottom of each sortable container.

Given that, looks like this is indeed a bug in the demos, as this demo doesn't have that workaround.

comment:3 Changed 2 years ago by Richard D. Worth

  • Status changed from assigned to closed
  • Resolution set to fixed

Sortable demos: connect lists - added some bottom padding to each container. Fixed #8114 - Sortable "Connect Lists" demo doesn't allow dropping as last element

Changeset: efdf6cdf9f0e6aaecad7b3ac53afca38938d9048

comment:4 Changed 2 years ago by Richard D. Worth

Sortable demos: connect lists - added some bottom padding to each container. Fixed #8114 - Sortable "Connect Lists" demo doesn't allow dropping as last element (cherry picked from commit efdf6cdf9f0e6aaecad7b3ac53afca38938d9048)

Changeset: fff9d87674b83c6a07569b6ce240d970b0ef61c2

comment:5 Changed 2 years ago by rdworth

  • Milestone changed from 1.9 to 1.8.18
Note: See TracTickets for help on using tickets.