views:

39

answers:

2

When I add any onkeyup event, it does not do what it's supposed to in Opera. It fires repeatedly while the key is held, not when it's released. This same event works correctly in Chrome and Firefox. I have no listeners for keydown or keypressed.

This simple code logs a stream of key events to the console in Opera when the key is held down. In Firefox and Chrome, it logs a single line when the key is released (I'm using Mootools, but it does the same with traditional event attaching, and does it attached anywhere: window, document, a text field...)

        $(window).addEvent("keyup", trapKeyUp);
        function trapKeyUp(e) {
            console.log(e);
        }

So my question is: is there something I'm doing wrong code wise in Opera's case, or is the browser just horribly broken? In searching on this site and Google I did not readily find any references to this specific issue. I'm using the latest Opera on Ubuntu

A: 

Hi, I know that Opera doesn't repeat keyup events on Windows, so it seems like an error (a bug) in the integration with the Ubuntu platform. If it is still a problem in a 10.70 preview build please report a bug at https://bugs.opera.com/wizard/ - if you give me the bug's reference number I can push it forward.

hallvors
Thanks for the replies everyone and sorry I was a slowpoke getting back to this. Yes, I was using the stable version, I should have been more clear about that. I went ahead and submitted a bug the other day (woops) but I'll check out the beta build and submit a proper bug if needed ;) (The number of the bug I submitted is DSK-315301, which you may or may not want to throw out!). As far as my question goes, though, I'm satisfied that it's only a bug and not a problem with my code.
Billy
A: 

I've had problems with this running opera for linux, the keyup is indeed triggered at a rate according to the auto-repeat set in the OS. I tested around, and opera on linux is the only browser still doing this, I think it was more common earlier.

I filed a bug for this earlier, reference id DSK-307269 if helps.

PS: It was a couple of months ago, so it might've been fixed since, but I assume you're on the latest, so not the case.

From email auto-generated when bug reported:

You can use this e-mail address (or reply to this e-mail) to update your report with more information, such as screenshots, crash logs, code examples, and so on:

[email protected].

This is the information you submitted to us: Version: 10.60 Build: 6386 Operating system: Linux Platform: PC

Summary: keyup js-event repeated while key stays down

Alexander Sagen