Homec4science

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

Authored by epriestley <git@epriestley.com> on Feb 1 2016, 21:42.

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

Details

Committed
epriestley <git@epriestley.com>Feb 1 2016, 22:20
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd41aaba2a184: Fix coverage line index lookup in diffusion browser
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH367b92b7fe8d: Fix an issue where drag positions could get out of sync after scrolling (authored by epriestley <git@epriestley.com>).Feb 1 2016, 22:20