Skip to main content

Search and Top Navigation

#5321 closed bug (fixed)

Opened March 11, 2010 08:54AM UTC

Closed May 07, 2012 01:04PM UTC

Last modified May 07, 2012 01:05PM UTC

Helper in a bottom-positioned Sortable is positioned wrong on drag start

Reported by: squeakytoy Owned by:
Priority: major Milestone: 1.8.21
Component: ui.sortable Version: 1.8rc3
Keywords: Cc:
Blocked by: Blocking:
Description

When a Sortable is placed in an absolutely positioned container where the position is set using 'bottom' with all other default settings, the helper is not positioned properly on drag start. It is positioned too high vertically by the amount of the height of the helper. The reason for this bug is that the placeholder has not yet been created at the time that the parent offset is calculated, and the bottom alignment of the list causes the offset to be calculated as a smaller amount.

The fix for this bug is to create the placeholder before the offsets are calculated. Attached is an html file that shows the big reproducible, and a patch to fix the issue.

Attachments (2)
  • 5321.patch (0.7 KB) - added by squeakytoy March 11, 2010 08:55AM UTC.

    Patch to resolve issue with helper positioning

  • sortable.html (0.9 KB) - added by squeakytoy March 11, 2010 08:55AM UTC.

    Repro of the issue

Change History (6)

Changed March 11, 2010 09:02AM UTC by squeakytoy comment:1

Ugh, ignore my late-night typos. At least the bug is fixed. :)

Changed March 11, 2010 08:13PM UTC by scottgonzalez comment:2

milestone: TBD1.next

Changed May 07, 2012 10:37AM UTC by martinf55 comment:3

Changed May 07, 2012 01:04PM UTC by martinf55 comment:4

resolution: → fixed
status: newclosed

Sortable: Moved change of helper position css. Fixed #5321 – Helper in a bottom-positioned Sortable is positioned wrong on drag start.

Changeset: 32f356bbfa9a8f3b90b4e64331e9108b4d87a349

Changed May 07, 2012 01:05PM UTC by martinf55 comment:5

Sortable: Moved change of helper position css. Fixed #5321 – Helper in a bottom-positioned Sortable is positioned wrong on drag start.

(cherry picked from commit 32f356bbfa9a8f3b90b4e64331e9108b4d87a349)

Changeset: 8e899dab6cd1fc410bbda0e7c88cdf1a1c8e9764

Changed May 07, 2012 01:05PM UTC by scottgonzalez comment:6

milestone: 1.next1.8.21