JSFiddle - React, Tailwind, and code Playground

HTML

<input class=a value=a>
<input class=b value=b>

    <br/>^ focus on the input<br/><br/>How to make input.b stay visible when focus moves to it?

CSS

.a {}
.b {display:none;}

JavaScript

$(".a").focus(function(){
    $(".b").show();   
});

var bFocused = false;

$(".a").blur(function(){
    setTimeout(function() {
        if(!bFocused) $(".b").hide();
    }, 50);
});

$(".b").focus(function(){
    $(".b").show();
    bFocused = true;
});

$(".b").blur(function(){
    $(".b").hide();
    bFocused = false;
});