Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Jul 11, 2025

Issue number: resolves #30459


What is the current behavior?

  1. Typing "12345" in a 4-box input-otp with type="text" is incorrectly triggering autofill detection on Android, causing "45" to be distributed across the first two boxes instead of replacing the "4" with the "5".

    Current Behavior: Type "12345"["4", "5", "", ""] (incorrectly distributed)
    Expected Behavior: Type "12345"["1", "2", "3", "5"] (correctly replaces last character)

  2. Typing an invalid character (like "w" when type="number") in an input box with a value is inserted, ignoring the input validation.

    Current Behavior: Type "2" in the first box, focus it again, type "w""2w" appears
    Expected Behavior: Type "2" in the first box, focus it again, type "w""2" remains (invalid character rejected)

What is the new behavior?

  • Fixes autofill detection on Android devices
  • Fixes invalid character insertion in filled input boxes
  • Improves cursor position handling when typing in a filled box
  • Adds e2e tests for more coverage

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 8.6.5-dev.11752245814.1253279a

Copy link

vercel bot commented Jul 11, 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 Jul 11, 2025 2:56pm

@github-actions github-actions bot added the package: core @ionic/core package label Jul 11, 2025
@brandyscarney brandyscarney marked this pull request as ready for review July 11, 2025 15:57
@brandyscarney brandyscarney requested a review from a team as a code owner July 11, 2025 15:57
@brandyscarney brandyscarney requested review from thetaPC and ShaneK and removed request for thetaPC July 11, 2025 15:57
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.

Solid improvement, great work!

@brandyscarney brandyscarney changed the title fix(input-otp): fix autofill detection and invalid character handling fix(input-otp): improve autofill detection and invalid character handling Jul 11, 2025
@brandyscarney brandyscarney added this pull request to the merge queue Jul 11, 2025
Merged via the queue into main with commit 8b4023d Jul 11, 2025
106 of 112 checks passed
@brandyscarney brandyscarney deleted the FW-6656 branch July 11, 2025 19:30
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(ion-input-otp): cursor does not jump to the first field
2 participants