Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 3, 2025

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented May 30, 2025

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

Copy link

vercel bot commented May 30, 2025

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
Copy link
Contributor

@thetaPC thetaPC left a comment

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
Copy link
Member

@ShaneK ShaneK left a comment

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!

@brandyscarney brandyscarney merged commit b77447b into feature-8.6 Jun 3, 2025
59 checks passed
@brandyscarney brandyscarney deleted the FW-6557 branch June 3, 2025 13:59
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