JSFiddle - React, Tailwind, and code Playground

by silverwind

HTML

<div tabIndex=0><input/></div>

JavaScript

document.querySelector("div").addEventListener("keydown", e => {
  e.preventDefault();
  e.stopPropagation();
});