Auto select search bar on submit
This commit is contained in:
parent
5a84789c7b
commit
d30365ae01
|
@ -26,7 +26,7 @@ $(document).ready(() => {
|
|||
}
|
||||
});
|
||||
|
||||
$('#search-bar').on('focus', e => {
|
||||
searchBar.on('focus', e => {
|
||||
setTimeout(() => e.currentTarget.select(), 100);
|
||||
});
|
||||
|
||||
|
@ -45,8 +45,9 @@ $(document).ready(() => {
|
|||
|
||||
success: (data) => {
|
||||
$('#ajax-content').html(generateHtml(word, data))
|
||||
searchBar.autocomplete('close');
|
||||
window.scrollTo(0, 0);
|
||||
searchBar.select();
|
||||
searchBar.autocomplete('close');
|
||||
},
|
||||
|
||||
error: err => console.error(err)
|
||||
|
|
Loading…
Reference in New Issue