autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

Autocomplete dropdown closes on click outside of browser window

Open mmoore99 opened this issue 3 years ago • 3 comments

The Autocomplete dropdown closes on any mouse click outside of the autocomplete component, even on a click outside of browser window. Is this the expected behavior? Is there any way to keep the dropdown list open when clicking outside of the component?

mmoore99 avatar Mar 09 '21 16:03 mmoore99

I think that's expected behavior. I'm just using a listener on document click to close the dropdown, so I can't really control when the browser fires that event.

trevoreyre avatar Mar 11 '21 01:03 trevoreyre

That would be very helpful have an attribute to turn this behavior off. Particularly during development, while working on styling the dropdown list...

msawired avatar Jul 14 '21 22:07 msawired

a workaround:

const autocomplete = new Autocomplete('#autocomplete', options);
autocomplete.core.hideResults = function() {};

BenjaminBeck avatar Mar 02 '23 09:03 BenjaminBeck