JSFiddle - React, Tailwind, and code Playground

HTML

<input name="q" type="text" />

JavaScript

$(function () {
    $(document).click(function () {
        $('input[name="q"]').focus();
    });
});