JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.63k stars 4.13k forks source link

[Android] Option is not selected when pressing enter #3641

Closed karlingen closed 3 years ago

karlingen commented 5 years ago

See the example Creatable Multiselect Example on https://react-select.com/creatable on an Android device (or simulator) using Chrome.

Possible reason: autocomplete="off" is not respected. If the user turns off autosuggestion in their keyboard settings, the enter button works.

react-select: v3.0.4 react: 16.8.6 chrome: 75.0.3770.101

Steps to replicate:

  1. Add some text inside the input
  2. Press enter.

Expected result:

A tag is created and Input is cleared.

Actual result:

Tag is not created. The entered text is still visible in the input.

karlingen commented 5 years ago

Temporary workaround:

private onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
    if (event.key === 'Enter') {
        document.dispatchEvent(new Event('compositionend'));
    }
}

This guy is for some reason still false although the user is done editing.

ssmereka commented 4 years ago

👍 I'm seeing this same issue.

ebonow commented 3 years ago

Greetings,

I am not able to replicate this issue in version 4.1 as I have tested in both the Chrome simulator and also in an Android virtual machine. @karaggeorge or @ssmereka if either of you are able to still reproduce we can re-open this, but at this time it appears this is working as intended.

francisleigh commented 2 years ago

Happening for moi.