JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css">
<input type="text" id="txt" size="20" />
<button type="button" id="btn">A button</button>

JavaScript

// To test this bug, focus cursor on the text box
// then hit TAB to focus the button, then hit ENTER.
// You may notice that even though the button has now
// lost focus, it remains in "active" state.

// Note this happens only when using keyboard, not mouse.

$("#btn").button().click(function() {
    $("#txt").focus();
    // Button now remains in active state (bug?)
    // Must manually remove class "ui-state-active", ie:
    // $("#btn").removeClass("ui-state-active");
});