JSFiddle - React, Tailwind, and code Playground

by KelseyW

HTML

<input type="text" />

JavaScript

var selectedInput = null;
$(function() {
    $('input').focus(function() {
        selectedInput = this;
    }).blur(function(){
        selectedInput = null;
        alert("bbb");
    });
});