ionic-team / ionic-team/ionic-framework

feat: overlays, enter key to dismiss dialog with inputs

Open
#21,665 4 comments 12 reactions 0 assignees View on GitHub
package: core type: feature request
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

# Feature Request

**Ionic version:**
[x] **5.2.3**

**Describe the Feature Request**
When running in a desktop browser, it is common to be able to use the Enter and Escape keys to dismiss alert dialogs.

For example, "Are you sure you want to..." with OK and Cancel buttons.

**Describe Preferred Solution**
Add a way to indicate this behavior when specifying the buttons to be displayed.

Possible approaches:
- `role` value to indicate the accept button (similar to current cancel behavior)
- property to indicate keyboard binding for buttons so enter could be specified as well as keys for other buttons.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.