Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple TextInput onClick moves cursor to the end of the word if no option is selected. #615

Closed
seppulcro opened this issue Feb 2, 2021 · 2 comments
Labels

Comments

@seppulcro
Copy link

Version

5.1.4 // any

Steps to reproduce

Using Multiple
https://ericgio.github.io/react-bootstrap-typeahead/#basic-example
https://codesandbox.io/s/9jq9jyzmry?file=/src/index.js

  1. Type Aryzhona in the text input.
  2. Use your mouse to click either the "y" or the "h" in "Aryzona" to try and remove it out.

Expected behavior

While typing a word in a multiple component, use the mouse to place the cursor somewhere in the word, or select part of it to remove/edit.

Actual behavior

When the user clicks somewhere using his mouse on the current word option the cursor is placed at the end of the word and won't allow any selection. You use the keyboard's arrow keys to place the cursor and select parts of the word, but the mouse always pushes the cursor to the end of the word. (This affects mobile users).
You either delete the whole word or use the keyboard to reach the character index you want to edit/add.

@seppulcro seppulcro added the bug label Feb 2, 2021
@ericgio
Copy link
Owner

ericgio commented Feb 3, 2021

Thanks for the bug report @seppulcro, I can reproduce the issue. Looks like the click event bubbles up to the container, which moves the cursor to the end of the string.

@ericgio
Copy link
Owner

ericgio commented Jul 9, 2021

Fixed in v5.2.0

@ericgio ericgio closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants