JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
JavaScript
$('input[type="text"]').on({
focus: function() {
if (!$(this).data('disabled')) this.blur()
},
dblclick: function() {
$(this).data('disabled', true);
this.focus()
},
blur: function() {
$(this).data('disabled', false);
}
});