autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

Clicking outside the text input twice sets the element's value to ''

Open kvnneff opened this issue 11 years ago • 3 comments

This can be replicated with the demo. Select an option and click outside the text input twice.

I think this is happening because of some of the logic between Autocomplete's hide method and Complement's _onblur method.

kvnneff avatar Jan 11 '15 18:01 kvnneff

would you like to help maintain this? i'm probably not going to touch this for half a year at least

jonathanong avatar Jan 11 '15 20:01 jonathanong

That's cool with me, your module is the best duo/component compatible autocomplete I've been able to find.

In my fork https://github.com/staygrimm/autocomplete/commit/fe8a0678a0b51d96b608758a8ee4525e4a0a7bbe I've simply commented out the line that resets the input value and the component works exactly as I like so far, but if you have a use-case for clearing out the value I'm sure I can rework the logic to fulfill all our needs.

kvnneff avatar Jan 15 '15 18:01 kvnneff

that's something that can be added manually by the end user, so id on't mind. the idea was to make it like select2 or a select box where if no valid option is selected, then clear it

jonathanong avatar Jan 15 '15 18:01 jonathanong