Page MenuHomePhabricator

Retain focused node when redrawing tokenizer/typeahead results
ClosedPublic

Authored by epriestley on Jul 11 2014, 5:30 PM.
Tags
None
Referenced Files
F13235948: D9900.id23946.diff
Tue, May 21, 7:15 AM
F13230782: D9900.diff
Mon, May 20, 11:19 PM
F13228723: D9900.id23946.diff
Mon, May 20, 11:33 AM
F13220036: D9900.id23767.diff
Sat, May 18, 10:50 PM
F13210508: D9900.diff
Fri, May 17, 4:55 AM
F13208582: D9900.id23946.diff
Thu, May 16, 5:48 PM
F13194212: D9900.diff
Sun, May 12, 9:24 PM
F13183143: D9900.id23946.diff
Fri, May 10, 6:59 AM
Subscribers
Tokens
"Like" token, awarded by joshuaspence.

Details

Summary

Ref T4420. Fixes T5473. Currently, when typeahead results get redrawn, you can lose your cursor position. A simple way to reproduce this is type "dif", select "Differential" using the arrow keys, then type "f". The selection will be lost.

Instead: store the old selection, then look for an item with the same name in the new set and select it. In effect, this preserves any focus selection.

Test Plan
  • Typed "dif".
  • Typed "down arrow key" to select "Differential".
  • Typed "f".
  • "Differential" remained selected.

Diff Detail

Repository
rP Phabricator
Branch
tok12
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1650
Build 1651: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Retain focused node when redrawing tokenizer/typeahead results.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jul 17 2014, 10:32 PM
epriestley updated this revision to Diff 23946.

Closed by commit rP962e60c561e8 (authored by @epriestley).