Skip to content

fix(input, select, textarea): emit one click event when slotted content is clicked - #31423

Open
thetaPC wants to merge 2 commits into
mainfrom
FW-7677
Open

fix(input, select, textarea): emit one click event when slotted content is clicked#31423
thetaPC wants to merge 2 commits into
mainfrom
FW-7677

Conversation

@thetaPC

@thetaPC thetaPC commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Issue number: resolves internal


What is the current behavior?

Clicking content in the start or end slot behaves differently in each form control. ion-input and ion-textarea emit the click event twice, while ion-select emits once but does not respond to the click at all.

The duplicate comes from the browser rather than from Ionic emitting twice. The wrapping <label> forwards the click to the native control, and that forwarded click is re-emitted from the host. Browsers skip this forwarding when the click lands on interactive content, which is why slotted buttons were never affected.

ion-select separately cancels the default action on every slotted click. A slotted link does not navigate and a slotted checkbox does not toggle, while the same markup works in ion-input.

What is the new behavior?

  • Clicking slotted content emits a single click event from all three components.
  • Decorative slotted content now activates the control: ion-input and ion-textarea focus, ion-select opens.
  • Interactive slotted content, such as a button or a link, keeps its own behavior and does not activate the control.
  • Slotted links and form controls work inside ion-select.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Previews:

@vercel

vercel Bot commented Sep 2, 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 Sep 3, 2026 2:28am UTC

Request Review

@github-actions github-actions Bot added the package: core @ionic/core package label Sep 2, 2026
@thetaPC
thetaPC marked this pull request as ready for review September 2, 2026 23:17
@thetaPC
thetaPC requested a review from a team as a code owner September 2, 2026 23:17
@thetaPC
thetaPC requested a review from OS-jacobbell September 2, 2026 23:17
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.

1 participant