When there is not enough place below the input field, the list with the suggestions is correctly placed above the input field. While typing, the list shrinks, but the top left position keeps its place, so there is a growing gap between the list and the input field.
This can be easily overcome by calling update after the open command on line 104.
this.off('keyup.autocomplete').keyup('keyup.autocomplete', function () {
if (createItems(_field, opts) > 0) {
_field.dropdown('show');
_field.dropdown('update'); // <--- This updates the position of the list
}
When there is not enough place below the input field, the list with the suggestions is correctly placed above the input field. While typing, the list shrinks, but the top left position keeps its place, so there is a growing gap between the list and the input field.
This can be easily overcome by calling
update
after theopen
command on line 104.