From 53d7ccab5639117bb4945f9ec96bc93acc64d0c5 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Wed, 4 Nov 2015 19:50:32 -0500 Subject: [PATCH] fix cannot set readonly property highlight --- app/assets/javascripts/src/Metamaps.GlobalUI.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb index 5c575e88..0290fee1 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb @@ -459,7 +459,7 @@ Metamaps.GlobalUI.Search = { $('.sidebarSearch .twitter-typeahead, .sidebarSearch .tt-hint, .sidebarSearchField').animate({ width: '0' }, 300, function () { - $('.sidebarSearchField').typeahead('setQuery', ''); + $('.sidebarSearchField').typeahead('val', ''); $('.sidebarSearchField').blur(); self.changing = false; self.isOpen = false; @@ -635,7 +635,7 @@ Metamaps.GlobalUI.Search = { $('.limitToMe').unbind().bind("change", function (e) { // set the value of the search equal to itself to retrigger the autocomplete event self.isOpen = false; - $('.sidebarSearchField').typeahead('setQuery', $('.sidebarSearchField').val()); + $('.sidebarSearchField').typeahead('val', $('.sidebarSearchField').val()); setTimeout(function () { self.isOpen = true; }, 2000);