Keypress Malfunction In Opera
I'm using the following code to detect users' key pressing, in JavaScript: $(document).bind('keydown', function (event) { 'use strict'; var keyCode = event.keyCode;
Solution 1:
Opera makes a mess, the keydown event does not repeat, and you cannot prevent the default for keydown in opera. For more http://quirksmode.org/dom/events/
Solution 2:
this is a known bug which should (finally!) get fixed soon. In short, keydown events are not repeated while keypress events are. Listening to keypress instead if you want repetition (and don't care about keys that do NOT fire keypress in all browsers like most function keys) should be a reasonable cross-browser solution.
Post a Comment for "Keypress Malfunction In Opera"