JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<div id="text" style="height: 50px; border: 1px solid black;">
<p style="width: 250px;">
text text text text text text 
</p>
</div>

<input type="text" id="chatInput">

JavaScript

$('#text').on('click', function () {
  // Any way to detect if the click was not a "mouse down"
  // type of click after high lighting text? If so, return
  $('#chatInput').focus();
});