jQuery – keydown() on div not working in Firefox July 21, 2023 by Tarik You need to give the div a tabindex so it can receive focus. <div id="testdiv" tabindex="0"></div>