JSFiddle - React, Tailwind, and code Playground

by JohnJ

HTML

<html>

<body>
<h1 id="qunit-header" tabindex="0">Lightbox Test Suite</h1>
<div id="result"></div>

</body>
</html>

JavaScript

var movable = $('#qunit-header');
    var count = 0;
    var focusListener = function () {
        ++count;
        $('#result').append('Focus called, count is :' + count + '<br />');
    };
    var doNothing = function() {
        $('#result').append('Do nothing<br />');
    }
    
    movable.bind('focus', focusListener);
    movable.bind('focusin', doNothing);
    
    movable.trigger('focus');