SyntaxFix
Write A Post
Hire A Developer
Questions
If you're dealing with an input element, I found it useful to set the pointer focus to back itself.
$('input').on('keydown', function(e) { if (e.keyCode == 9) { $(this).focus(); e.preventDefault(); } });