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();   
});

$(".a,.b").blur(function(){
    var f = false;
    if($(".a").is(":focus")) var f = true;
    if($(".b").is(":focus")) var f = true;
    if(!f) $(".b").hide();
});