I agree with Thomas, this sounds just like something that could be
handled with a DeferredCommand. See
http://stackoverflow.com/questions/691684/gxt-keylistener-componentkeydown-immediately-closes-messagebox-alert
(the post is GXT-related but the general idea is the same).

On Nov 9, 2:49 am, gwtfanb0y <[email protected]> wrote:
> Can you provide us the code where you assign the KeyListener to the
> button? This makes it easier to analyze the problem.
>
> On 7 Nov., 04:33, Open eSignForms <[email protected]> wrote:
>
> > I have a dialog box, with a close button that is given the focus so
> > that hitting Enter results in it closing.
>
> > That works fine.  In fact, it seems that the Enter actually results in
> > a Click event, perhaps because it's a button receiving the key.
>
> > But my onClick handler sets the focus on an input TextBox field on the
> > form "under it" that cause the error.  This then seems to cause the
> > onKeyUp key to fire on that TextBox.  I don't want this since the key
> > actually was hit on the dialog box.
>
> > If my dialog box doesn't set the focus back, this doesn't seem to
> > happen.  But when it does set the focus back, it seems to cause the
> > Enter to also be sent to it.
>
> > What am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to