diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 14:46:35 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 14:46:35 +0100 |
commit | 6c9d9d26bb19a22eca1cf17cf23a715320be62ba (patch) | |
tree | 4ae5cae97e805da23569305d533246d0b2df7543 /search | |
parent | 2eec8dc156d6bbeb8a40fa9547fbc266bd881437 (diff) | |
download | nextcloud-server-6c9d9d26bb19a22eca1cf17cf23a715320be62ba.tar.gz nextcloud-server-6c9d9d26bb19a22eca1cf17cf23a715320be62ba.zip |
do not hide search results when clicking, but hide on ESC
Diffstat (limited to 'search')
-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); |