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)
Sat, Apr 20, 7:19 PM
Unknown Object (File)
Tue, Apr 16, 9:50 AM
Unknown Object (File)
Fri, Mar 29, 8:45 AM
Unknown Object (File)
Feb 16 2024, 7:10 PM
Unknown Object (File)
Feb 12 2024, 7:53 AM
Unknown Object (File)
Feb 12 2024, 7:53 AM
Unknown Object (File)
Feb 8 2024, 6:40 PM
Unknown Object (File)
Feb 6 2024, 5:19 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).