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

Results remain open when clicking inside a second typeahead field #192

Closed
nop33 opened this Issue Apr 29, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@nop33

nop33 commented Apr 29, 2016

Hello!

I found out that when using 2 typeahead fields, there's a problem occurring when switching from one to the other using the mouse. I prepared 2 jsfiddle snippets to reproduce the issue.

http://jsfiddle.net/eyetea/pzqffwgf/3/
First, click on the Venue field (the results will open normally) and without selecting anything, click on the Room field. The results of the Venue field will remain open and clicking outside will never close them (except if you press ESC while the focus is on the field).

I tried to solve this problem by simply calling hideLayout when switching between these two fields. But then a similar problem occurs, which is that the second field results will remain open this time. Here's another jsfiddle where you can reproduce it: http://jsfiddle.net/eyetea/dw932nv7/1/

Thanks a lot and let me know if I can be of any help.
Ilias

@nop33

This comment has been minimized.

nop33 commented Apr 29, 2016

Reducing and simplifying the code of the jsfiddles:

@nop33 nop33 referenced this issue Apr 29, 2016

Closed

Fixes for location widget #2374

3 of 4 tasks complete

running-coder added a commit that referenced this issue May 2, 2016

@running-coder running-coder added the Bug label May 2, 2016

@running-coder running-coder added this to the 2.6.1 milestone May 2, 2016

@running-coder

This comment has been minimized.

Owner

running-coder commented May 2, 2016

Hey Ilias, I haven't tested much using multiple instances of Typeahead on the same page. The problem was that I was using .typeahead alias for binding/unbinding events. This should now be fixed by using the node.selector + .typeahead to give unique names for events so unbinding events from the first Typeahead doesn't affect the second.

Let me know if everything works fine

running-coder added a commit that referenced this issue May 3, 2016

Version 2.6.1
Fixes
- #189 Twice url encoding
- #190 Strange JS-code fragment in href attribute value in result list when using jQuery version below 1.10
- #192 Results remain open when clicking inside a second typeahead field
- #193 Clicking on a suggested option does not select it on IE11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment