javascript - Firefox keydown not working when page is initially loaded -


this maybe no brainer you. trying figure out why keydown not triggered in firefox upon initial load.

$(document).keydown(function(){alert("test")}) 

i add above code in javascript , when open page , without clicking pressing key. can see key pressed not cautch @ all. however, after click background of page press keyboard. can see key caught then.

this doesn't happen in chrome, in firefox.

is familiar chance.

thanks


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -