JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Click on input or textarea call to the Delete internally</h1>
<textarea>Sample</textarea>
<input value='My name'/>
<button id='delete'>Delete</button>
JavaScript
$('button').click(function(){
$('input, textarea').val('');
});
$('input, textarea').click(function(e){
$('#delete').click(); // call internally to Delete button
});