Closed studioromeo closed 4 years ago
On the search page there's usage of some keyboard events that are now deprecated and could be removed from future browsers.
keyCode is deprecated in favour of code & key. We use key as we care about the value of the key rather than it's physical position. (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode)
keyCode
keypress is a deprecated event in favour of keydown which represents the same thing but isn't deprecated. (https://developer.mozilla.org/en-US/docs/Web/API/Document/keypress_event)
keypress
The javascript is pretty much the same as before so this should be ok for people to port into their themes that used this as a boilerplate.
This is great, thanks @studioromeo! Love that they, and you, changed it to something more semantic. 13 is almost arbitrary in meaning, Enter is actually readable
13
Enter
On the search page there's usage of some keyboard events that are now deprecated and could be removed from future browsers.
keyCode
is deprecated in favour of code & key. We use key as we care about the value of the key rather than it's physical position. (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode)keypress
is a deprecated event in favour of keydown which represents the same thing but isn't deprecated. (https://developer.mozilla.org/en-US/docs/Web/API/Document/keypress_event)The javascript is pretty much the same as before so this should be ok for people to port into their themes that used this as a boilerplate.