carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.85k stars 1.81k forks source link

[Bug]: ComboBox cursor jumps to the end when modifying filter text #17114

Open crichtonibm opened 2 months ago

crichtonibm commented 2 months ago

Package

@carbon/react

Browser

Chrome, Firefox

Package version

1.63.1

React version

18.2.0

Description

When using Combo box (evident even in Storybook), if you type some text into the filter, you can then use backspace to remove the end chars and all seems well. However, if you change where the point is in the string and insert or remove characters, it will allow the one modification, and then the cursor immediately jumps to the end of the text

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-combobox--default

Steps to reproduce

In the Sandbox for ComboBox, type a filter of exammmp and then use the arrows to back up to the first M and hit delete key. It will delete the M and position the point at the end of the entered text. I would expect it to keep the cursor where it was located so I could continue to modify the string

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

ABI

Code of Conduct

2nikhiltom commented 2 months ago

Hey @crichtonibm Thank you for reporting this. Do you know a Package version where this worked as expected for you ?

crichtonibm commented 2 months ago

It has been like this since we started using carbon react last Dec.

crichtonibm commented 4 days ago

Note, I just retested and this seems to now be working