aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2021-11-19 14:24:28 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2021-11-19 14:24:28 +0100
commit2e693816ae3e4976a6bb15e5b23f3422b936f000 (patch)
tree137f5275bffe8608df2e0f65ed6c84dddedb113e
parentc47eb7388a5be0faa6454c49c6034e6963667b93 (diff)
#385: Do not focus search field if current element has value
-rw-r--r--assets/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/assets/search.js b/assets/search.js
index 33a8a5e..2d75fee 100644
--- a/assets/search.js
+++ b/assets/search.js
@@ -30,6 +30,10 @@
* @param {Event} event
*/
function focusSearchFieldOnKeyPress(event) {
+ if (event.target.value !== undefined) {
+ return;
+ }
+
if (input === document.activeElement) {
return;
}