Hi David,
as you told i have used preventDefault and it working fine, can you plase
let me know the below code is fine/ or is there any better way
*final* SuggestBox suggestBox = *new* SuggestBox(suggest) {
*public* *void* onBrowserEvent(Event event) {
*super*.onBrowserEvent(event);
*boolean* *esc* = *false*;
*switch* (event.getTypeInt()) {
*case* Event.*ONKEYDOWN*:
*if* (event.getKeyCode() == KeyCodes.*KEY_ESCAPE*) {
DOM.*eventPreventDefault*(event);
}
*break*;
}
}
};
On Monday, July 1, 2013 3:11:26 PM UTC+5:30, stuckagain wrote:
> That is default behavior of a text input field (set back to what it was
> before starting to edit).
> I guess you could do a preventDefault on the ESC key event.
> David
> On Mon, Jul 1, 2013 at 11:39 AM, Dayananda B V
> <[email protected]<javascript:>
> > wrote:
>
>> Hi Jens,
>>
>> thanks for replay, what i want is when i type a text suggestbox and when
>> I hit escape key, whatever the text I entered is clearing.
>> i don't want to clear the text.
>>
>> On Monday, July 1, 2013 1:43:32 PM UTC+5:30, Jens wrote:
>>
>>> I am using GWT 2.5.1 and when I hit ESC in a SuggestBox nothing happens
>>> at all. Thats what I would expect as SuggestBox does not handle ESC
>>> explicitly (see SuggestBox.addEventsToTextBox(**)). You can also try it
>>> yourself using: http://gwt.**googleusercontent.com/samples/**
>>> Showcase/Showcase.html#!**CwSuggestBox<http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSuggestBox>
>>>
>>>
>>> I would guess its an issue in your app and not in GWT.
>>>
>>> -- 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 [email protected] <javascript:>.
>> To post to this group, send email to
>> [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.