lepoco / lepoco/wpfui

Auto-suggest list can't be navigated with keyboard

Open
#454 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Most auto-suggest controls tend to support keyboard-exclusive operation, i.e. once suggestions start to appear, you can press up/down arrows to navigate the list and either tab or enter (or both) to accept the highlighted suggestion. The WinUI auto-suggest behaves this way as well.

The WpfUI component doesn't seem to work that way. Suggestion list acts more like a popup that is out of the normal flow, can't be navigated or tabbed into, etc.

To Reproduce
  1. Create an app/page using a <ui:AutoSuggestBox> or open the demo app to input page and scroll to AutoSuggestBox.
  2. Start typing query.
  3. Press up/down/tab/enter keys while suggestions are open.
Expected behavior

Up/down keys change the highlighted suggestion. Tab and/or enter inserts the suggestion into the text box.

Screenshots

No response

OS version

Windows 10.0.19044

.NET version

6.0

WPF-UI NuGet version

N/A, built demo app directly from main branch.

Additional context

Mouse navigation is OK for some discoverability use cases, e.g. user doesn't know what options are available, or wants to see a list of popular suggestions, etc. However, auto-suggest is also often used as an accelerator, e.g. typing out a long file path and getting suggestions for the next directory. Without keyboard navigation, the control cannot be effectively used for the second set of use cases; having to continually switch between keyboard and mouse tends to take longer than typing the item in full.

Might be considered more of a feature request than a bug, but, as mentioned above, being able to navigate auto-suggestion lists with keyboard is pretty ubiquitous across existing desktop and web implementations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the demo app's input page and locate the AutoSuggestBox described in the reproduction steps. Inspect the control's keyboard and suggestion-list behavior, then verify that Up/Down changes the highlighted suggestion and Tab and/or Enter accepts it while suggestions are open.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.