react-autosuggest icon indicating copy to clipboard operation
react-autosuggest copied to clipboard

Need help on "having the suggestion lists open if user click done in iOS virtual keyboard"

Open YingyuWu opened this issue 7 years ago • 6 comments

*Example Basic example.

  • Provide the steps to reproduce the issue, e.g.:
    1. Focus on the input field
    2. Type c, and wait for suggestions to appear
    3. Click done after typing dismiss suggestions
screen shot 2017-10-23 at 12 02 37 pm

Observed behaviour: Suggestions stay open When done button is clicked in virtual keyboard, suggestions are dismissed. Expected behaviour: Suggestions should be closed When done button is clicked in virtual keyboard, suggestions are will stay open

  • Please describe your use case from user journey point of view, e.g.: I want to keep the suggestions list open if user click done button in iOS virtual keyboard.

YingyuWu avatar Oct 23 '17 19:10 YingyuWu

+1

ajGingrich avatar Apr 10 '18 20:04 ajGingrich

same issue in 2019

tonycassara avatar Feb 27 '19 21:02 tonycassara

same issue in 2020

ahmetkuslular avatar Jan 02 '20 07:01 ahmetkuslular

+1

AndreyFedarovich avatar Jun 02 '20 10:06 AndreyFedarovich

Is it really an expected behaviour? What if user clicked done to remove the keyboard from the screen and then tap a suggestion?

aberezkin avatar Jun 02 '20 10:06 aberezkin

I've been looking for a fix as well. I came up with this work around. Basically if the input is blurred it will never clear out the suggestions unless the input box is empty. Which is also kind of annoying because you can't close the suggestions unless you clear out the input box. However you could add an X button or something to clear it. I also render the input to select all of the text on focus to easily clear it out with a backspace.

onSuggestionsClearRequested = () => { if(this.state.value.trim() === '') { this.setState({ suggestions: [] }); } };

const inputComponent = inputProps => ( <div> <input {...inputProps} style={{cursor:"pointer"}} onClick={(event) => event.target.select()}/> </div> );

matthewhoman avatar Mar 05 '21 17:03 matthewhoman