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
F15483534: D9900.diff
Wed, Apr 9, 12:55 PM
F15480953: D9900.id.diff
Tue, Apr 8, 5:31 PM
F15476639: D9900.id23767.diff
Mon, Apr 7, 8:08 AM
F15475859: D9900.id23946.diff
Mon, Apr 7, 12:43 AM
F15469942: D9900.diff
Fri, Apr 4, 6:21 PM
F15441027: D9900.id.diff
Mar 26 2025, 4:06 PM
F15433740: D9900.diff
Mar 25 2025, 12:28 AM
F15387965: D9900.id23767.diff
Mar 15 2025, 3:09 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).