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
Unknown Object (File)
Fri, Jan 17, 7:01 AM
Unknown Object (File)
Tue, Jan 14, 4:10 PM
Unknown Object (File)
Fri, Dec 20, 6:36 PM
Unknown Object (File)
Dec 16 2024, 6:57 PM
Unknown Object (File)
Dec 15 2024, 6:37 PM
Unknown Object (File)
Dec 8 2024, 3:56 PM
Unknown Object (File)
Dec 3 2024, 11:07 PM
Unknown Object (File)
Dec 3 2024, 11:24 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
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).