jQuery-Autocomplete
jQuery-Autocomplete copied to clipboard
[BUG][iOS] Incorrect suggestions position on IOS with minChars:0 option and fixed search input
We have a fixed positioning header with search input. When user scrolling down and click search input, local suggestion are displayed, then ios keyboard showing from bottom, so suggestions position are broken
styles:
.header {position:fixed; top:0; left:0; right:0;}
js:
$('.search-form').autocomplete({
minChars: 0,
paramName: 'q',
lookup: function (query, done) {
if(query==='') {
var search_queries = searchHistory.getItems();
done(search_queries);
} else {
$.get('/suggest/',{q:query}, function(data) {
result = JSON.parse(data);
done(result);
});
}
}
});
example:
