setupListeners() {
const navHandler = new KeyboardNavigationHandler(
this.list,
- event => {
+ () => {
this.input.focus();
setTimeout(() => this.hideSuggestions(), 1);
},
*/
displaySuggestions(suggestions) {
if (suggestions.length === 0) {
- return this.hideSuggestions();
+ this.hideSuggestions();
+ return;
}
// This used to use <button>s but was changed to div elements since Safari would not focus on buttons