JSFiddle - React, Tailwind, and code Playground
HTML
<input id="chk" type="checkbox" disabled />
<label for="chk">Checkbox</label>
JavaScript
// --- the bug --- //
var chk = document.getElementById("chk");
console.log("enabling checkbox");
chk.disabled = false;
setTimeout(function(){
console.log("calling the click method in setTimeout");
chk.click();
});
console.log("done");