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

Click events leaking through to underlying elements #84

Open
IanMcGarryWWU opened this issue Apr 2, 2020 · 1 comment · May be fixed by #94 or #95
Open

Click events leaking through to underlying elements #84

IanMcGarryWWU opened this issue Apr 2, 2020 · 1 comment · May be fixed by #94 or #95

Comments

@IanMcGarryWWU
Copy link

Since the code uses mousedown not click to pick up the selections of the suggestions the click event then fires on whatever happens to be underneath the suggestion.

This confused the hell out of me for ages. I guess it doesn't matter if whatever is under it isn't responsive to clicks but for me it was closing the entire form every time I selected a suggestion.

@TheNaderio
Copy link

You can try to quickfix it by adding stopPropagation().
If you're using the autocomplete.min.js , you can search for:

... n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")) ...

And add it like this:

... n("autocomplete-suggestion","mousedown",function(e){e.stopPropagation();if(t(this,"autocomplete-suggestion")) ...

Helped me with the same problem - closes my dropdown, which includes the searchfield everytime when I clicked a suggestion.

This was referenced Oct 6, 2023
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

Successfully merging a pull request may close this issue.

2 participants