mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
do not hide search results when clicking, but hide on ESC
This commit is contained in:
parent
2eec8dc156
commit
6c9d9d26bb
2 changed files with 14 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue