Skip to content

Commit

Permalink
alex-shpak#385: Do not focus search field if current element has value
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed Nov 19, 2021
1 parent c47eb73 commit 2e69381
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
* @param {Event} event
*/
function focusSearchFieldOnKeyPress(event) {
if (event.target.value !== undefined) {
return;
}

if (input === document.activeElement) {
return;
}
Expand Down

0 comments on commit 2e69381

Please sign in to comment.