JSFiddle - React, Tailwind, and code Playground

HTML

standard: <input type="text" value="foo" /><br/>
readonly: <input type="text" value="foo" readonly /><br/>
disabled: <input type="text" value="foo" disabled/>

JavaScript

$('input[readonly]').focus(function(){
    this.blur();
});