diff options
-rw-r--r-- | search/css/results.css | 6 | ||||
-rw-r--r-- | search/js/search.js | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/search/css/results.css b/search/css/results.css index dd746391387..f2e6e475483 100644 --- a/search/css/results.css +++ b/search/css/results.css @@ -7,11 +7,15 @@ overflow-x:hidden; overflow-y: auto; text-overflow:ellipsis; - padding-top: 45px; + padding-top: 65px; height: 100%; box-sizing: border-box; z-index:75; } + +#searchresults.hidden { + display: none; +} #searchresults * { box-sizing: content-box; } diff --git a/search/js/search.js b/search/js/search.js index b74674d5aa7..87b8908aa0a 100644 --- a/search/js/search.js +++ b/search/js/search.js @@ -276,12 +276,6 @@ currentResult++; renderCurrent(); } - } else if(event.keyCode === 27) { //esc - $searchBox.val(''); - if(self.hasFilter(getCurrentApp())) { - self.getFilter(getCurrentApp())(''); - } - self.hideResults(); } else { var query = $searchBox.val(); if (lastQuery !== query) { @@ -297,6 +291,15 @@ } } }); + $(document).keyup(function(event) { + if(event.keyCode === 27) { //esc + $searchBox.val(''); + if(self.hasFilter(getCurrentApp())) { + self.getFilter(getCurrentApp())(''); + } + self.hideResults(); + } + }); $searchResults.on('click', 'tr.result', function (event) { var $row = $(this); @@ -316,13 +319,6 @@ scrollToResults(); return false; }); - $(document).click(function (event) { - $searchBox.val(''); - if(self.hasFilter(getCurrentApp())) { - self.getFilter(getCurrentApp())(''); - } - self.hideResults(); - }); placeStatus(); OC.Plugins.attach('OCA.Search', this); |