JSFiddle - React, Tailwind, and code Playground
HTML
<span class="parent" contenteditable>Click me</span>
CSS
.parent {
background: oldLace;
cursor: pointer;
}
.parent:focus {
cursor: initial;
}
JavaScript
$('.parent > *')
.focus(function() {
$('.parent').addClass('focused');
})
.blur(function() {
$('.parent').removeClass('focused');
});