JSFiddle - React, Tailwind, and code Playground

by MrTest

JavaScript

var ArrowFlag = "1";

     $('input, textarea, select').focusin( function() {
        var ArrowFlag = "0"; 
        //console.log(ArrowFlag) will = 0
     });

    $(document).bind('keyup', function() {
    // When input:focus console.log(ArrowFlag) will = 1
    });