Peter
Peter

Reputation: 11835

jQuery keyup keyCode doesn't work in Opera

Is it possible that the opera browser ignore the keyCode 40 (arrow down)?

 $('#test').keyup(function(e) {
        $('body').append('' + e.keyCode + '');
 })

Test it at: http://www.jsfiddle.net/V9Euk/454/

Thanks in advance!
Peter

Upvotes: 3

Views: 1643

Answers (2)

Giuseppe Accaputo
Giuseppe Accaputo

Reputation: 2642

Try to use the autocomplete attribute, and set it to off:

<input id="test" value="" autocomplete="off" >

Opera uses the arrow down key for auto completion, and may therefore suppress the forwarding of the event.

Working test: http://www.jsfiddle.net/V9Euk/455/

Upvotes: 7

Thariama
Thariama

Reputation: 50832

Yes, this does not work (seems like opera does not support it). Have a look at this test page from www.w3.org showing you what your broswer detects (keyup is not fired).

Upvotes: 1

Related Questions