Skip to content

fix(input-otp): correctly handle autofill by splitting the values into all inputs - #30444

Merged
brandyscarney merged 6 commits into
feature-8.6from
FW-6557
Jun 3, 2025
Merged

fix(input-otp): correctly handle autofill by splitting the values into all inputs#30444
brandyscarney merged 6 commits into
feature-8.6from
FW-6557

Conversation

@brandyscarney

@brandyscarney brandyscarney commented May 30, 2025

Copy link
Copy Markdown
Member

Issue number: N/A


What is the current behavior?

When filling the Input OTP from inside of a Capacitor app or using autofill in the browser, the entire value is being inserted into the 1st input box so it is only getting the 1st character.

What is the new behavior?

Detect when the value is longer than one in the onInput handler and split it up across all inputs.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 8.5.7-dev.11748895007.1c98a49b

@vercel

vercel Bot commented May 30, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2025 8:10pm

@github-actions github-actions Bot added the package: core @ionic/core package label May 30, 2025
@brandyscarney
brandyscarney marked this pull request as ready for review June 2, 2025 20:22
@brandyscarney
brandyscarney requested a review from a team as a code owner June 2, 2025 20:22

@thetaPC thetaPC 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, thanks!

@thetaPC
thetaPC requested review from ShaneK and removed request for christian-bromann June 2, 2025 23:52

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Neat! I also like all the new tests 💪 Great work!

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.

3 participants