JSFiddle - React, Tailwind, and code Playground
HTML
To reproduce: tab focus to button, then press enter key.<br/>
<input id='text'/> <button id='btn'>Click me</button>
<div id='output'></div>
JavaScript
$(document).ready(function(){
$('#text').keyup(function(event){
$('#output').append('key ');
});
$('#btn').click(function(event){
$('#text').focus();
$('#output').append('btn ');
});
});