when using onInputChange/inputValue, cursor is positioned to the end of the input field on each keystroke #5942
Labels
issue/bug-unconfirmed
Issues that describe a bug that hasn't been confirmed by a maintainer yet
This is on react-select v5.8.0.
My
onInputChange
handler is storing the text in a local var,inputValue
is being provided as prop. If you position the cursor inside the input text, and type a character the cursor jumps to the end.I am doing this, because in certain situations I want to programmatically modify the input text.
One solution would be for the control to remember the text cursor location when updating the text from the prop and restore afterwards.
Another solution, which is not complete but would cover a lot of it, would be simply to do nothing if
inputValue
is the same as the current text in the input element.The text was updated successfully, but these errors were encountered: