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

[Search] onSelect return false does not prevent results from closing #3856

Closed
blazuka opened this issue Mar 22, 2016 · 3 comments
Closed

[Search] onSelect return false does not prevent results from closing #3856

blazuka opened this issue Mar 22, 2016 · 3 comments

Comments

@blazuka
Copy link

blazuka commented Mar 22, 2016

Per the documentation, returning false in this callback should prevent the search results from closing:

The function should return false to prevent default action (closing search results and selecting value)

@jlukic
Copy link
Member

jlukic commented Mar 22, 2016

.Hi, thanks for posting. Your issues missing a test case.

You can create a test case by forking this JSFiddle. It already includes the necessary dependencies and adding your test case.

For more explanation, check out our contributing guide.

@jlukic jlukic added this to the 2.1.9 milestone Mar 22, 2016
@blazuka
Copy link
Author

blazuka commented Mar 23, 2016

Test case here: http://jsfiddle.net/8L5z3djv/

You can see that the search term remains in the input after selection, but the results close.

@jlukic
Copy link
Member

jlukic commented May 15, 2016

I've fixed this in 2.2, instead of preventing the bubbled event which could cause compatibility issues, I've decided to create a flag to track bubbled blur events from negated search clicks.

Fiddle from next
http://jsfiddle.net/mcgbckuu/

@jlukic jlukic closed this as completed May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants