Hi, All,
I try to catch key down event for "F1" key and display my own help
popup. I wrote following code to handle KeyDownEvent. The method is
bind by UI Binder.
@UiHandler("takenByTextBox")
void handleKeyPress(KeyDownEvent event) {
int key = event.getNativeKeyCode();
if (key == 112) { // F1 key
event.stopPropagation();
event.preventDefault();
Window.alert("F1 pressed.");
}
}
The method firstly check if F1 is pressed. If yes, stop propagation
and preventDefault, then popup alert window. It works in Firefox. But
IE still pops up its own help window, event my alert window is also
popped up.
Does anyone have the same problem, and would you give me a hand? Thank
you in advance.
--
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.