Skip to content

Instantly share code, notes, and snippets.

@csdy
Last active December 17, 2015 16:49
Show Gist options
  • Save csdy/5641477 to your computer and use it in GitHub Desktop.
Save csdy/5641477 to your computer and use it in GitHub Desktop.
Fix modal window focus for Twitter Bootstrap
$(".modal").on("shown", function() {
document.activeElement.blur()
$(this).find(".modal-body :input:visible:first").focus();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment