JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="box1" />
<input type="text" id="box2" />
JavaScript
var mouseDownID;
$('#box1').blur(function () {
console.log('box1 is being blurred, ' + mouseDownID + ' will gain focus');
});
$('#box2').mousedown(function () {
mouseDownID = this.id;
console.log('mousedown fired on ' + mouseDownID);
});