don't show more autocomplete suggestion than fit the screen

This commit is contained in:
Laura Klünder 2017-10-28 16:20:53 +02:00
parent 18aac563f4
commit 75630f33d1

View file

@ -92,7 +92,8 @@ c3nav = {
matches.sort(c3nav._typeahead_matches_compare);
$autocomplete.html('');
for (i=0;i<matches.length;i++) {
var max_items = Math.min(matches.length, Math.floor($('#resultswrapper').height()/55));
for (i=0;i<max_items;i++) {
$autocomplete.append(matches[i][0]);
}
},