From 57a8b654ba871d4a9c22f102e8e5e7479bf15b68 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 21:25:20 +0800 Subject: [PATCH] smoother 'added by me' filtering --- app/assets/javascripts/src/Metamaps.GlobalUI.js.erb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb index b08217a7..7cc97da0 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb @@ -655,14 +655,11 @@ Metamaps.GlobalUI.Search = { self.limitMapsToMe = !self.limitMapsToMe; } - // set the value of the search equal to itself to retrigger the autocomplete event - self.isOpen = false; + // set the value of the search equal to itself to retrigger the + // autocomplete event var searchQuery = $('.sidebarSearchField.tt-input').val(); $(".sidebarSearchField").typeahead('val', '') - $(".sidebarSearchField").focus().typeahead('val', searchQuery).focus(); - setTimeout(function () { - self.isOpen = true; - }, 2000); + .typeahead('val', searchQuery); }); // when the user clicks minimize section, hide the results for that section