Improve arrow key navigation of Kicker search results

Authored by hein on Sep 5 2018, 10:01 AM.



Kicker already makes sure the first search result is highlighted
and actionable while searching. This patch makes arrow-down after
typing move to the second search result instead of merely moving
focus from the search field to the list, so the user doesn't have
to press arrow-down twice anymore.

It also allows using arrow-left/right to jump to the other result
columns, when the cursor is at the start or end of the text field,


Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
hein created this revision.Sep 5 2018, 10:01 AM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 5 2018, 10:01 AM
hein requested review of this revision.Sep 5 2018, 10:01 AM
ngraham requested changes to this revision.Sep 5 2018, 2:54 PM

Hmm, this doesn't quite fix the issue for me. After searching for something, the top item in the list is still highlighted as before, but with this patch when I press the down arrow key once, the selection rect disappears! When I press it again, the top item becomes selected again. Only on a third press of the down arrow key does selection move to the next item.

This revision now requires changes to proceed.Sep 5 2018, 2:54 PM
hein added a comment.Sep 5 2018, 3:25 PM

Indeed. Sorry, I introduced a small bug with a fatal copy and paste mistake just before uploading.

ngraham accepted this revision.Sep 5 2018, 8:20 PM

Much better, thanks! Verified that the bug is fixed now, and I can't find any behavioral regressions.

This revision is now accepted and ready to land.Sep 5 2018, 8:20 PM
This revision was automatically updated to reflect the committed changes.