react icon indicating copy to clipboard operation
react copied to clipboard

AutoComplete.Input - when editing input value, caret jumping to end (right-most-location)

Open divyanshu0469 opened this issue 7 months ago • 2 comments

Description

The AutoComplete.Input is possibly re-rendering the input onChange, causing the caret to jump to the end (right-most-location). If I try editing the input, only one alphabet is added to the desired location, others are added at the end because the caret resets to the end location

Steps to reproduce

  1. Go to [https://primer.style/react/storybook/?path=/story/components-autocomplete-features--add-new-item](AutoComplete Storybook)
  2. Type some input in the input box of the component like '123456789'
  3. Use the mouse or keyboard arrow keys to position the caret or insertion position to just before '2'
  4. Type some other input like 'abcd' (Only 'a' will be added to the desired location, other characters will be added to the end of the input)

Version

v37.23.0

Browser

Chrome

divyanshu0469 avatar May 30 '25 09:05 divyanshu0469

Thanks for submitting this issue! We’ll review it during monthly planning preparation to consider picking up based on current priorities.

sunnyi101 avatar Jun 02 '25 16:06 sunnyi101

Thanks for submitting this issue! We’ll review it during monthly planning preparation to consider picking up based on current priorities.

how will i know if this is going to be fixed this month or not ?

divyanshu0469 avatar Jun 02 '25 16:06 divyanshu0469

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Nov 29 '25 17:11 github-actions[bot]