On 15 sep, 22:58, Benjii <[email protected]> wrote:
> Does anyone know whats going on here?
>
> I have a KeyPressHandler and KeyDownHandler (see below) and I setup a
> simple VerticalPanel to view debug output. If I press the down arrow
> in IE / Safari / Chrome / Hosted Mode, I see:
>
> K. DOWN: 40
>
> If I press down arrow in FireFox, I see:
>
> K.Down: 40
> K.PRESS: 40 : (
>
> If I do the open bracket character (shift + 9) in Safari / Chrome /
> Hosted Mode, I see:
>
> K.DOWN: 16
> K.DOWN: 57
> K.PRESS: 40 : (
>
> and in Firefox:
> K.DOWN: 16
> K.DOWN: 57
> K.PRESS: 40 : (
>
> Why does Firefox give me a bracket character for the down cursor????

Because of a bug in Firefox that fires a keypress event for such a key
(well, not really a bug if you consider there's no spec for those
events, but I believe that's how it should work, just as in IE and
Safari, just as the textInput event from DOM 3 Events)

> And why is the keycode for down cursor the same as bracket across all
> browsers?

Because you're actually not supposed to use the "keyCode" in a
"keypress" event (just because you pressed *two* keys for the one
character you wanted).

See http://code.google.com/p/google-web-toolkit/issues/detail?id=3753

It is acknowledged that GWT keyboard events are buggy ("not ideal" at
best) and that they need some work. Just that no-one actually spent
time on them for now (hmm, maybe I'll try making a patch if I find
some time...)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to