Skip to content
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

Unexpected Behavior When Entering Letters in OTP Input Example #1464

Closed
lmelb opened this issue Nov 8, 2024 · 2 comments
Closed

Unexpected Behavior When Entering Letters in OTP Input Example #1464

lmelb opened this issue Nov 8, 2024 · 2 comments
Labels
type: documentation A change or addition to the documentation

Comments

@lmelb
Copy link

lmelb commented Nov 8, 2024

Change Type

Correction

Proposed Changes

Description:

When entering letters in the OTP input field of the example, unexpected behavior occurs:

  • The active number box moves forward as expected, but no letters are visibly displayed in the boxes.
  • When attempting to delete letters (the empty boxes), there is no immediate visual indication of changes. Instead, the visual update only occurs after hitting the backspace for each empty box plus one additional backspace.

Steps to Reproduce:

  1. Open the OTP input field examples.
  2. Enter letters instead of numbers.
  3. Observe the following:
    • The active box shifts forward as each letter is entered.
    • Characters are not shown in the input field, despite the cursor moving.
  4. Try to delete characters.
    • No immediate feedback is provided until all characters have been deleted, plus an extra backspace.

Done in Brave browser on Linux.
The Pattern example works as expected, but all others don't.

Expected Behavior:

  • Only numbers should be accepted in the OTP input fields.
  • Any invalid character (like letters) should either not be accepted or should trigger an error message.
  • Deleting characters should provide immediate visual feedback.
@lmelb lmelb added the type: documentation A change or addition to the documentation label Nov 8, 2024
@ieedan
Copy link
Contributor

ieedan commented Nov 8, 2024

Pretty sure bits-ui just needs to go to the latest version on the docs site.

If you use the latest version of bits-ui this should work just fine in your project.

@huntabyte
Copy link
Owner

Thanks @ieedan !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

3 participants