Page MenuHomePhabricator

Fix two bugs with DraggableList
ClosedPublic

Authored by epriestley on Jan 12 2014, 10:51 PM.
Tags
None
Referenced Files
F15508283: D7939.diff
Wed, Apr 16, 4:08 AM
F15446508: D7939.id.diff
Thu, Mar 27, 7:22 PM
F15440252: D7939.id17981.diff
Wed, Mar 26, 11:40 AM
F15427408: D7939.diff
Sun, Mar 23, 2:18 PM
F15413109: D7939.id17981.diff
Wed, Mar 19, 5:02 PM
F15408889: D7939.id17960.diff
Wed, Mar 19, 2:06 AM
F15403936: D7939.id.diff
Tue, Mar 18, 5:36 AM
F15402156: D7939.id.diff
Mon, Mar 17, 8:57 PM
Subscribers

Details

Summary

Ref T1344. This fixes two issues with DraggableList:

  • In lists which allowed it, you could drag the top item above itself and get a dashed-border ghost item. This didn't make sense and didn't behave well. Just don't treat this operation as valid.
  • In lists which allowed it, you could drag any non-top item to the topmost position, then drag it to an invalid position. The dashed-border ghost item would not be removed properly if this happend.
  • Also fix some minor leftovers with Celerity.
Test Plan
  • Dragged the first item above itself; now an invalid operation with no ghost.
  • Dragged another item to the first position then back to its original position; ghost vanishes.
  • Clean lint.

Diff Detail

Branch
board3
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

webroot/rsrc/js/core/DraggableList.js
162–165

Note this for null vs false trickiness.

I tried to make a good joke about null, but I kept coming up false. (See how bad that was?)