New issue
Advanced search Search tips

Issue 891858 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

cr-searchable-drop-down does not support arrow keys

Project Member Reported by baileyberro@chromium.org, Oct 3

Issue description

the cr-searchable-drop-down component does not support navigating through the dropdown with arrow keys
 
Cc: weifangsun@chromium.org
weifang@- is this something we should be supporting? This component was derived from the dropdowns in the Add Printers dialog for selecting manufacturer and model. I believe the drop down options can be navigated with <tab> currently
Components: Platform>Apps>FileManager Enterprise
Labels: Enterprise-Triaged
Components: -Enterprise
Labels: -Enterprise-Triaged
Cc: mikinm@chromium.org x...@chromium.org
Hmm, I think that the correct behavior is to support arrow keys, but I think the current behavior may be due to the fact that the dropdown implements a search.

+xdai@ who implemented Add Printer dialogs - Is there a reason why we can't navigate these dropdowns with arrow keys?
I agree it should support arrow keys, and I don't see any reason to stop us from supporting that. 
It looks like cr-searchable-drop-down should be a listener of keydown event.

Components: Internals>Printing>CUPS
Labels: Bolton-UI
Great, thanks! Let's move forward with adding support for arrow keys then.
FWIW, one of the arguments for using a native <select> instead of custom dropdowns is that keyboard behavior works out of the box (including arrow navigation, and searching).

Just mentioning this, to keep in mind as an alternative, instead of re-implementing all that for cr-searchable-dropdown from scratch. The downside is that the <select>'s expanded (popup) UI can't be styled for the most part.

This is one of many reasons (for example placement of the popup depending on space availability) why we decided to use <select> for most cases, see [1].

[1] https://cs.chromium.org/chromium/src/ui/webui/resources/html/md_select_css.html

Sign in to add a comment