JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' id='txtLeave'/>
JavaScript
$("#txtLeave").focus(function() {
$(this).mouseleave(function() {
console.log("leaving...");
$(this).off();
});
});
<input type='text' id='txtLeave'/>
$("#txtLeave").focus(function() {
$(this).mouseleave(function() {
console.log("leaving...");
$(this).off();
});
});