JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
JavaScript
$("input:text").keydown(function(e){
if(e.which == 38 || e.which == 40)
e.preventDefault();
});
<input type="text" />
$("input:text").keydown(function(e){
if(e.which == 38 || e.which == 40)
e.preventDefault();
});