JSFiddle - React, Tailwind, and code Playground

by Taras Vasylivskyy

HTML

<div class="container">
<textarea name="" id="textarea" cols="30" rows="10"></textarea>
<button class=".button">hit keyboard for ios</button>
</div>

CSS

.container {
  position: relative;
}
textarea {
  width: 200px;
  height: 20px;
  
}

JavaScript

document.addEventListener('click', function(event) {
	if (event.target.classList.contains('.button')) {
		let txtarea = document.getElementById('textarea');
    txtarea.focus();
	}
})