AlaskaAirlines / auro-input

Custom HTML element for inputting string data in forms
https://auro.alaskaair.com/components/auro/input
Apache License 2.0
2 stars 4 forks source link

Editing a date input jumps the cursor to the end of the input #146

Open geoffrich opened 2 years ago

geoffrich commented 2 years ago

Describe the bug

When I enter a new character in a date input or remove a character with backspace, the cursor jumps to the end of the input with every keystroke.

To Reproduce

Steps to reproduce the behavior:

  1. Go to auro-input on the doc site and scroll to "date input"
  2. Type in "01/03/2022"
  3. Click after the 3 and hit backspace. The cursor jumps to the end of the input.
  4. Click after "/0" and enter 3 again. The cursor jumps to the end of the input

Expected behavior

The cursor does not jump to the end of the input.

Screenshots

date

Desktop (please complete the following information):

Smartphone (please complete the following information):

n/a

Additional context

blackfalcon commented 2 years ago

This is a never-ending issue with this element. There have been multiple things done to try and negate this issue with the ever-growing complexity.

I fear that this will be a rabbit hole of fix/break work.

I stress that we must consider breaking up this element into individual sub-elements per their specific experiences.

blackfalcon commented 2 years ago

I marked this as blocked so that this is NOT worked on prior to the systematic breakup of the auro-input element.