JSFiddle - React, Tailwind, and code Playground
by Paul Draper
HTML
<input id="input">
JavaScript
document.getElementById('input').focus();
document.addEventListener('mousedown', function(e) {
console.log(e.target);
if(e.target.id != 'input')
e.preventDefault();
});