Thanks for writing this. I was wondering if you should be using keyup instead so that the event does not trigger on a down event and I think keypress is deprecated.
Oh right, I'd forgotten about that! Thank you! I checked the Mozilla docs and they suggest keydown, so I'll give that a shot. Editing my code accordingly. <3
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for writing this. I was wondering if you should be using
keyup
instead so that the event does not trigger on a down event and I think keypress is deprecated.Guidance on not triggering down-events from sc. 2.5.2 Pointer Cancellation: w3.org/TR/WCAG21/#pointer-cancella...
Guidance on keypress event from MDN: developer.mozilla.org/en-US/docs/W...
Oh right, I'd forgotten about that! Thank you! I checked the Mozilla docs and they suggest
keydown
, so I'll give that a shot. Editing my code accordingly. <3