diff --git a/static/index.js b/static/index.js index 2584834..29234df 100644 --- a/static/index.js +++ b/static/index.js @@ -18,6 +18,7 @@ $(document).ready(() => { let searchBar = $('#search-bar'); searchBar.autocomplete({ + appendTo: '#search-form', source: (request, response) => { $.ajax({ url: '/langs/polish/words?like=' + request.term + '&limit=20&offset=0', @@ -31,10 +32,6 @@ $(document).ready(() => { setTimeout(() => e.currentTarget.select(), 100); }); - $(window).on('scroll', () => { - searchBar.autocomplete('close'); - }); - $('#search-form').on('submit', (e) => { e.preventDefault();