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

Autocomplete dropdown closes on click outside of browser window #126

Open
mmoore99 opened this issue Mar 9, 2021 · 3 comments
Open

Autocomplete dropdown closes on click outside of browser window #126

mmoore99 opened this issue Mar 9, 2021 · 3 comments

Comments

@mmoore99
Copy link

mmoore99 commented Mar 9, 2021

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?

@trevoreyre
Copy link
Owner

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.

@msawired
Copy link

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

@BenjaminBeck
Copy link

BenjaminBeck commented Mar 2, 2023

a workaround:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants