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

[fix] InputMask cursor position jumps #2671

Open
brandonlenz opened this issue Nov 29, 2023 · 1 comment
Open

[fix] InputMask cursor position jumps #2671

brandonlenz opened this issue Nov 29, 2023 · 1 comment
Labels
type: bug Something isn't working like it's supposed to uswds bug

Comments

@brandonlenz
Copy link
Contributor

brandonlenz commented Nov 29, 2023

ReactUSWDS Version & USWDS Version:

USWDS: latest (at time of writing 3.7.0)
ReactUSWDS: latest (at time of writing 6.0.0)

Describe the bug

Editing InputMask input is a bad user experience due to jumping cursor

To Reproduce
Steps to reproduce the behavior:

  1. Go to storybook
  2. Click on fill out any field, i.e. a phone number
  3. Scroll down to move your cursor to the middle or start of the field
  4. Note that any input attempting to backspace, delete, or replace a character immediately jumps to the end of the input
  5. Go to USWDS site and repeat steps 2 through 4, noting that the issue is present in USWDS as well

Expected behavior

Cursor position should be preserved.

There are a variety of open issues related to USWDS input mask (https://github.com/uswds/uswds/issues?q=is%3Aissue+is%3Aopen+mask), but I didn't see one specific to this issue, so step 1 would be to review and open with USWDS if necessary so that we can get their POV.

Additional context

Device and Browser Information (please complete the following information if describing a UI bug):

  • Browser firefox, chrome
@brandonlenz brandonlenz added the type: bug Something isn't working like it's supposed to label Nov 29, 2023
@brandonlenz brandonlenz changed the title [fix] Input Mask Cursor position jumps [fix] InputMask cursor position jumps Nov 30, 2023
@werdnanoslen werdnanoslen self-assigned this Mar 18, 2024
@werdnanoslen
Copy link
Member

I've posted this upstream to uswds/uswds#5827

@werdnanoslen werdnanoslen removed their assignment Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working like it's supposed to uswds bug
Projects
None yet
Development

No branches or pull requests

2 participants