Problem with Opera and jquery keydown returns false

I am trying to do this in Opera 10 and not working:

$('input').keydown(function(){ return false; }); 

This works great in other browsers.

Can someone tell me something about this?

Thanks!

+4
source share
1 answer

See table of key events . Opera does not cancel keystrokes if keydown preventDefault. Use keypress to cancel keyboard input.

(Although this is rarely a good idea. Intercepting keystrokes does not stop the field from being changed in other ways than by dragging and dropping, for example, set the readonly or disabled true properties to correctly stop the changed value.)

+5
source

All Articles