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

API Close Dropdown #66

Closed
ericlbarnes opened this issue Aug 8, 2013 · 1 comment
Closed

API Close Dropdown #66

ericlbarnes opened this issue Aug 8, 2013 · 1 comment

Comments

@ericlbarnes
Copy link

I am looking at the api and it says you can use the close() method which closes the autocomplete dropdown menu. By using the examples/api.html I do not see that working. Here is the example:

$('#button-additem').on('click', function() {
    control.addItem(2);
    control.close();
});

Am I missing something? Or calling this incorrectly?

@brianreavis
Copy link
Member

It turns out this behavior was a side effect of another issue. When calling addItem(), it was giving the control focus—which isn't the intended behavior of the method. Because focus is deferred, the close() executed first, then the focus event re-opened the dropdown a split second later.

Thanks for pointing this out!

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

2 participants