You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In two places, there is a check if a certain keydown event was triggered by the 191 key code to e.g. focus on the input search bar. Even though I think this is wrong or at least might not work on every machine.
At least on my (Ubuntu) Machine, using Brave Browser typing / doesn't result in the key code 191 but in 55 which is the keyCode for 7.
So instead of checking for the keyCode in the two places mentioned further down, but also in the other places I would suggest to use the event.key property instead.
So I would replace e.keyCode === 191 with e.key === '/'.
I verified with the following snippet, that it works accordingly. Also you can see that I type in / but the keyCode55 is printed to the console.
Also after changing this locally the focus on the search input worked again.
I'm looking in to using an updated version of this theme. @mr-pascal Are there similar issues with other keyCodes? Or do you just mean switch up all e.keyCodes to be e.key so it's easier to read and there is no character or encoding issues?
In two places, there is a check if a certain
keydown
event was triggered by the191
key code to e.g. focus on the input search bar. Even though I think this is wrong or at least might not work on every machine.At least on my (Ubuntu) Machine, using Brave Browser typing
/
doesn't result in the key code191
but in55
which is thekeyCode
for7
.So instead of checking for the
keyCode
in the two places mentioned further down, but also in the other places I would suggest to use theevent.key
property instead.So I would replace
e.keyCode === 191
withe.key === '/'
.I verified with the following snippet, that it works accordingly. Also you can see that I type in
/
but thekeyCode
55
is printed to the console.Also after changing this locally the focus on the search input worked again.
The two places:
adidoks/static/index.js
Line 8 in 6887e4e
adidoks/static/js/search.js
Line 8 in e03e8a5
I don't mind preparing a PR/fix for the
191
case, but can also do so for the other ones.The text was updated successfully, but these errors were encountered: