Skip to main content

Search and Top Navigation

#15167 closed bug (fixed)

Opened April 18, 2017 01:49AM UTC

Closed May 02, 2017 06:03PM UTC

Last modified May 02, 2017 07:09PM UTC

Sortable appendTo behavior doesn't match documentation

Reported by: borgboyone Owned by: scottgonzalez
Priority: minor Milestone: 1.12.2
Component: ui.sortable Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:
Description

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:

http://stackoverflow.com/questions/10772129/jquery-sortable-with-overflow-hidden-between-two-lists/42278126#42278126

http://stackoverflow.com/questions/10796303/jquery-sortable-and-custom-scroll-bar?noredirect=1&lq=1

http://stackoverflow.com/questions/19754777/jquery-sortable-with-two-divs-with-overflowauto-object-disappears?rq=1

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.

Attachments (0)
Change History (5)

Changed April 19, 2017 12:58AM UTC by borgboyone comment:1

description: 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 or there is zIndex interference. 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 "html" to gain working functionality: \ \ <StackOverflow references here> \ \ This work around fails in many cases especially if scrolling containers are present. \ \ <jsFiddle reference here> \ \ The sortable code should be corrected so that the appendTo behavior is as expected. \ 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: \ \ [http://stackoverflow.com/questions/10772129/jquery-sortable-with-overflow-hidden-between-two-lists/42278126#42278126] \ \ [http://stackoverflow.com/questions/10796303/jquery-sortable-and-custom-scroll-bar?noredirect=1&lq=1] \ \ [http://stackoverflow.com/questions/19754777/jquery-sortable-with-two-divs-with-overflowauto-object-disappears?rq=1] \ \ 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. \

Changed April 19, 2017 01:40AM UTC by borgboyone comment:2

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

Changed April 19, 2017 01:46AM UTC by rjollos comment:3

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

Changed May 02, 2017 06:03PM UTC by scottgonzalez comment:4

owner: → scottgonzalez
resolution: → fixed
status: newclosed

In [changeset:"c866e455373028a62a0956455a229fef63e91fac" c866e45]:

#!CommitTicketReference repository="" revision="c866e455373028a62a0956455a229fef63e91fac"
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

Changed May 02, 2017 07:09PM UTC by scottgonzalez comment:5

milestone: none1.12.2