Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#15167 closed bug (fixed)

Sortable appendTo behavior doesn't match documentation

Reported by: A. Wells Owned by: Scott González
Priority: minor Milestone: 1.12.2
Component: ui.sortable Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by A. Wells)

The stated documentation for the ui.sortable appendTo option indicates that the helper is to be appended (as in DOM movement) to the target specified in the option. This is necessary in cases where there is multiple depths between connecting sortable containers from a common parent, there is zIndex interference, or the container has "overflow: hidden". Erratic behavior sometime occurs when the helper attempts to transfer from the original container to the connecting container and generally the sort fails if adverse conditions prevail.

It is noted that specifying a common parent container does not work unless it is the HTML node itself. In almost all cases it is necessary to set the helper option to "clone" in conjunction with an appendTo of "body" to gain working functionality:

This work around fails in many cases especially if scrolling containers are present.

There are several examples as fiddles in the SO links.

The sortable code should be corrected so that the appendTo behavior is as expected.

Change History (5)

comment:1 Changed 6 years ago by A. Wells

Description: modified (diff)

comment:2 Changed 6 years ago by A. Wells

Can someone fix the spelling of sortable in the title please? I can't seem to do that.

comment:3 Changed 6 years ago by Ryan J Ollos

Summary: Sortalbe appendTo behavior doesn't match documentationSortable appendTo behavior doesn't match documentation

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

Owner: set to Scott González
Resolution: fixed
Status: newclosed

In c866e45:

Sortable: Fix various scrolling issues

  • Created _scroll extension point and migrated scroll code from _mouseDrag
  • Cleaned up logic for scrolled
  • Fixed appendTo functionality to match documentation
  • Remove unnecessary function calls
  • Move set-up position functions to appropriate place
  • Base scrollParent on placeholder and not helper
  • Update scrollParent when switching containers

Fixes #3173
Fixes #15165
Fixes #15166
Fixes #15167
Fixes #15168
Fixes #15169
Fixes #15170
Closes gh-1793

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

Milestone: none1.12.2
Note: See TracTickets for help on using tickets.