ElemeFE / ElemeFE/element

[Feature Request] Do not prevent propagation of escape keydown event when select menu is closed

Open
#20,854 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component
Yes

### Component Name
Select

### Description
Please update the select component's keydown handling logic so it doesn't stop propagation of the event if escape is pressed while the select menu is already hidden.

Our use case: In an effort to improve keyboard navigation of an internal tool we use, we'd like to enable the following flow:

1. A user opens a dialog
2. Tabs to the desired select element
3. Changes the value and hides the select's menu
4. Press escape to close the dialog

Step 4 is not currently possible due to the select element stopping propagation on all keydown events for escape, regardless of menu state.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.