Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-10 Thread Thomas Broyer
On 11 nov, 02:40, Yozons Support on Gmail wrote: > It seems that it doesn't really matter.  The DialogBox itself works fine, > and whether I call setFocus() immediately or through a DeferredCommand, the > result is the same. That's weird! This means the "click" of the button isn't triggered by

Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-10 Thread Yozons Support on Gmail
It seems that it doesn't really matter. The DialogBox itself works fine, and whether I call setFocus() immediately or through a DeferredCommand, the result is the same. What is not clear is why there is a KeyUp event fired at all. I am not even listening for keyup in the dialog. I just have a

Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-10 Thread Brandon Tilley
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, gwtf

Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-09 Thread gwtfanb0y
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 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

Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-09 Thread Thomas Broyer
On Nov 7, 4:33 am, Open eSignForms 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

Re: Enter key on dialog "close button" results in enter key processed by other widget

2009-11-08 Thread Dalla
This sounds wierd. Are you saying that an event is being fired when a user hits the enter key with focus on a button, without you having registered a onKeyDown, onKeyPress or onKeyUp event handler for that button? If the onClick event is fired when you hit enter on the keyboard, it sounds like on