Hi all,
I have some widgets with keyDown-Bindings (e.g. F11). These keyDown bindings only work when the widget got the focus. If the user leaves the focus F11 triggers the browser behaviour (fullscreen).
Now I tried to deactivate the global keybindings by adding this code inside the EntryPoint:
For global stuff this works fine. But if I hit a key inside my widgets the PreviewNativeEvent will be called first. If I cancel events inside this event now, my local keybinding are not called. Thats how it work "by design".
Therefore my question: Could I hang an eventhandler between GWT-Eventhandling and Browser?
I found new SchedulerImpl().scheduleFinally(new ScheduledCommand()...) but I cannot trigger an event here.
Best Regards
Alex
-- I have some widgets with keyDown-Bindings (e.g. F11). These keyDown bindings only work when the widget got the focus. If the user leaves the focus F11 triggers the browser behaviour (fullscreen).
Now I tried to deactivate the global keybindings by adding this code inside the EntryPoint:
Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(final NativePreviewEvent event) {
if (BrowserEvents.KEYDOWN.equals(event.getNativeEvent().getType())) { //cancel event if KeyCode = F11 }
}
});
For global stuff this works fine. But if I hit a key inside my widgets the PreviewNativeEvent will be called first. If I cancel events inside this event now, my local keybinding are not called. Thats how it work "by design".
Therefore my question: Could I hang an eventhandler between GWT-Eventhandling and Browser?
I found new SchedulerImpl().scheduleFinally(new ScheduledCommand()...) but I cannot trigger an event here.
Best Regards
Alex
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment