Skip to content

fix(alert): only block Enter on checkbox inputs, not the whole document - #31643

Merged
ShaneK merged 1 commit into
mainfrom
FW-7874
Oct 27, 2026
Merged

ShaneK merged 1 commit into
mainfrom
FW-7874

Conversation

@ShaneK

@ShaneK ShaneK commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Issue number: resolves #30811


What is the current behavior?

Currently, an ion-alert with checkbox inputs calls preventDefault() on every Enter keydown on the page because the check lives in its document-level keydown listener. This happens even while the alert is closed, so textareas don't get new lines and buttons don't activate, including the alert's own OK and Cancel buttons.

What is the new behavior?

The Enter block now lives on the checkbox buttons, so Enter still can't toggle a checkbox but works everywhere else.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

9.0.10-dev.11792788258.1f71cfee

@ShaneK
ShaneK requested a review from a team as a code owner October 23, 2026 20:43
@ShaneK
ShaneK requested a review from brandyscarney October 23, 2026 20:43
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Oct 23, 2026 8:45pm UTC

Request Review

@OS-jacobbell OS-jacobbell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShaneK
ShaneK added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 28d2940 Oct 27, 2026
115 of 117 checks passed
@ShaneK
ShaneK deleted the FW-7874 branch October 27, 2026 15:14

This branch was successfully deployed

1 active deployment
Preview — f71cfee9 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: IonAlert hijacks 'insertLineBreak' when using inputs

2 participants