I have issues with Firefox and keydown function.
It will not trigger the function in Firefox but it works in Safari and Chrome. I know preventDefault is the cause of the problem, but I want to block the default scrolling and trigger an other function.
$(document).keydown(function(e){
if(e.keyCode == 40)
{
movePointer();
e.preventDefault();
}
});
Does someone have other sugestions?
What version is your firefox? I’ve tested this on FF12:
Works great for me. You might notice i swapped the
preventDefaultandmovePointerfunction, so as the modified the conditionals a bit. It does block the scrolling for the keydown, but not the keyup scroll.