JSFiddle - React, Tailwind, and code Playground
HTML
<input id="field1" value="" />
<input id="field2" value="" />
<input id="otherField" value="" />
JavaScript
$("body").focusin(function(event) {
alert(event.target.id);
});
<input id="field1" value="" />
<input id="field2" value="" />
<input id="otherField" value="" />
$("body").focusin(function(event) {
alert(event.target.id);
});