diff --git a/search/css/results.css b/search/css/results.css index f2e6e47548..04f7b6dcb9 100644 --- a/search/css/results.css +++ b/search/css/results.css @@ -5,10 +5,8 @@ #searchresults { background-color:#fff; overflow-x:hidden; - overflow-y: auto; text-overflow:ellipsis; padding-top: 65px; - height: 100%; box-sizing: border-box; z-index:75; } diff --git a/search/js/search.js b/search/js/search.js index d8922cf167..d1e25913e3 100644 --- a/search/js/search.js +++ b/search/js/search.js @@ -81,6 +81,7 @@ var currentResult = -1; var lastQuery = ''; + var lastInApps = []; var lastPage = 0; var lastSize = 30; var lastResults = {}; @@ -115,6 +116,7 @@ return; } lastQuery = query; + lastInApps = inApps; lastPage = page; lastSize = size; @@ -234,9 +236,11 @@ */ function onScroll(e) { if ($searchResults) { - //if ( $searchResults && $searchResults.scrollTop() + $searchResults.height() > $searchResults.find('table').height() - 300 ) { - // self.search(lastQuery, lastPage + 1); - //} + var resultsBottom = $searchResults.offset().top + $searchResults.height(); + var containerBottom = $searchResults.offsetParent().offset().top + $searchResults.offsetParent().height(); + if ( resultsBottom < containerBottom * 1.2 ) { + self.search(lastQuery, lastInApps, lastPage + 1); + } placeStatus(); } }