Skip to content

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

Open
@divyanshu0469

Description

@divyanshu0469

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions