SyntaxFix
Write A Post
Hire A Developer
Questions
So maybe the best solution to cover as many browsers as possible and be future proof would be
if (event.which === 13 || event.keyCode === 13 || event.key === "Enter")