You could also use a key handler:
void onKeyUp(KeyUpEvent event) {
if(event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
event.preventDefault(); //IE clears text on ESC. We don't want that.
}
}
If you want that behavior throughout your app (which would be a good idea because of UI consistency) you should extend SuggestBox, override onBrowserEvent (or use an internal key up handler) and then use your customized SuggestBox everywhere.
-- J.
-- 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/groups/opt_out.
No comments:
Post a Comment