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
F13965825: D9900.id.diff
Oct 16 2024, 4:28 AM
F13964988: D9900.id23767.diff
Oct 15 2024, 11:11 PM
Unknown Object (File)
Oct 12 2024, 9:21 PM
Unknown Object (File)
Oct 10 2024, 11:49 PM
Unknown Object (File)
Oct 10 2024, 11:48 PM
Unknown Object (File)
Sep 2 2024, 6:18 PM
Unknown Object (File)
Aug 27 2024, 9:59 PM
Unknown Object (File)
Aug 24 2024, 5:59 PM
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
Lint
Lint Skipped
Unit
Tests Skipped

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).