>
> As @Stole mentioned, use isSuggestionListShowing() of the SuggestBox in 
> KeyDownHandler instead of KeyUpHandler and move your existing from KeyUp to 
> KeyDowm. Because onSelection will trigger before onKeyUp but after 
> onKeyDown 
>
        mySuggestBoxObject.addKeyDownHandler(new KeyDownHandler() {
            @Override
            public void onKeyDown(KeyDownEvent event) {
                int key = event.getNativeEvent().getKeyCode();
                if (mySuggestBoxObject.isSuggestionListShowing() && key == 
KeyCodes.KEY_ENTER) {
                    event.getNativeEvent().preventDefault();
                }
            }
        }); 

-- 
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+unsubscr...@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.

Reply via email to