summaryrefslogtreecommitdiffstats
path: root/search
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-01-05 14:28:09 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-05 14:28:09 +0100
commit10038640aeab6b156c15cac9fe8da438dad31d7b (patch)
tree0737dc52c83aefbc0d51157de2cc4e49e97a1449 /search
parentba931d2124a915233d99edabdac730f3a9abdd54 (diff)
downloadnextcloud-server-10038640aeab6b156c15cac9fe8da438dad31d7b.tar.gz
nextcloud-server-10038640aeab6b156c15cac9fe8da438dad31d7b.zip
fix onScroll breaking search, fix keyboard navigation, fix filter for files in other dirs
Diffstat (limited to 'search')
-rw-r--r--search/js/search.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/search/js/search.js b/search/js/search.js
index d1e25913e37..58778900a69 100644
--- a/search/js/search.js
+++ b/search/js/search.js
@@ -213,7 +213,7 @@
var result = $searchResults.find('tr.result')[currentResult];
if (result) {
var $result = $(result);
- var currentOffset = $searchResults.scrollTop();
+ var currentOffset = $('#app-content').scrollTop();
$('#app-content').animate({
// Scrolling to the top of the new result
scrollTop: currentOffset + $result.offset().top - $result.height() * 2
@@ -235,7 +235,7 @@
* This appends/renders the next page of entries when reaching the bottom.
*/
function onScroll(e) {
- if ($searchResults) {
+ if ($searchResults && lastQuery !== false) {
var resultsBottom = $searchResults.offset().top + $searchResults.height();
var containerBottom = $searchResults.offsetParent().offset().top + $searchResults.offsetParent().height();
if ( resultsBottom < containerBottom * 1.2 ) {