You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blur method fires a timeout which will check where the focus is after 150 ms in order to close the menu or keep it open. However, that verification was checking if the $menu was the owner of the focus. $menu is an "ul", so it can't be the owner of any focus. Probably the real intetion was to check $element, so I made the corresponding change.
Note: in issue tcrosen#24@smucode suggest checking for $menu.is(':hover'). That could be a better solution to the problem discussed in that issue... or probably there's even a better one out there... It would be a good idea to give it some thoughts in order to fix that issue too.
I found an issue with your blur event.
Using Chrome on Mac, Jquery 1.8.2 and latest 2.0 js as of the date of this posting. Im using an ajax based source not that it matters.
Here is where the issue occurs:
listen: function () {
this.$element
.on('blur', $.proxy(this.blur, this))
.on('keyup', $.proxy(this.keyup, this));
This blur event will sometimes fire and complete before the browser has a chance to send the click event to the typeahead list.
I found changing the timeout from 150ms to 250ms fixed the issue on my development box. Is there a better way we could write this?
The text was updated successfully, but these errors were encountered: