HomePhabricator

Fix an issue where drag positions could get out of sync after scrolling

Description

Fix an issue where drag positions could get out of sync after scrolling

Summary:
Ref T5240. Currently, we calculate drag positions assuming the "ghost" element is not present (it isn't, usually), then adjust them while dragging to account for the ghost.

However, this fails after scrolling: we dirty the cache, but the ghost is present. We continue adjusting for it, but essentially double-adjust. This leads to scroll positions being about 80-ish px off from where they should be.

Test Plan:

  • Begin dragging a task in a long task list.
  • While dragging, use mousewheel to scroll to the bottom of the list.
  • Drag task downward through the list.
    • Before fix: ghost is off by, like, an inch or so.
    • After fix: ghost position is accurate to cursor position.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5240

Differential Revision: https://secure.phabricator.com/D15157