Saturday, November 27, 2010

clicking outside of widget seems to disable NativePreviewHandler ONKEYPRESS

I'm using a NativePreviewHandler to intercept ONKEYPRESS events
application-wide. I'm doing this so that I can implement a customized
text entry widget (example at
http://www.quickbrownfrog.com/#!typing:lesson:lesson001.xml:1).

It's been working fine, but I recently noticed a problem on IE8: if
the user clicks outside of my widget, the NativePreviewHandler no
longer gets ONKEYPRESS events; it's as if the widget has "lost focus",
even though it's not relying on focus for receiving events.
Interestingly, it still seems to get mouse events, just not key
presses. If the user clicks inside the widget, it will again start
receiving ONKEYPRESS.

This does not seem to happen on Safari, Firefox or Chrome.

My understanding of Event.addNativePreviewHandler() is that it will
receive ALL events, regardless of focus... is that incorrect?

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment