JSFiddle - React, Tailwind, and code Playground

HTML

<textarea cols="50" rows="10">The caret used to be placed at the start of the text, 
but in Firefox 51+ it is placed at the end of the text instead.</textarea>
<br><br>click here before 1 sec in v.51

JavaScript

window.focus(); // works only in 54 ?
// in 51, you have to click yourself in the rendering iframe... before 1sec has elapsed
setTimeout(function(){ 
document.querySelector('textarea').focus(); }, 
1000);