Skip to content

Reposition list when items are shown above input field #30

@martinstoeckli

Description

@martinstoeckli

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
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions