JSFiddle - React, Tailwind, and code Playground
by TJ VanToll
HTML
<p>Place focus into the textbox and press Enter. In IE a click event will be triggered on the <code><button></code>, even though no <code><form></code> is present.</p>
<p>The workaround is to add <code>type="button"</code> to the <code><button></code>.</p>
<input>
<button>Button</button>
JavaScript
document.querySelector( "button" ).addEventListener( "click", function() {
alert( "click" );
});