JSFiddle - React, Tailwind, and code Playground
HTML
<form id="form">
<input type="text" />
<input type="text" />
<input type="text" />
<input disabled="disabled" />
<input readonly="readonly" value="readonly" />
<textarea></textarea>
<input type="submit" />
</form
CSS
input, textarea { float: left; clear: both; }
JavaScript
$(":input").on("keydown", function(event) {
if (event.which === 13 && !$(this).is("textarea, :button, :submit")) {
event.stopPropagation();
event.preventDefault();
$(this)
.nextAll(":input:not(:disabled, [readonly='readonly'])")
.first()
.focus();
}
});