Issue #3533 submitted:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3533

Thanks,
-Sumit Chandel

On Thu, Apr 9, 2009 at 3:36 PM, Sumit Chandel <sumitchan...@google.com>wrote:

> Hi jchimene,
> Thanks for catching this. What you've discovered is essentially a bug. I
> reproduced it on my end and can confirm that events will fire twice for
> pretty much any class extending Composite because of the two onBrowserEvent
> calls in the Composite class (one to super, the other from the wrapped
> widget).
>
> It looks like the rationale for making this change was discussed in Issue
> #3211 (link below). While it seems to make sense, I think this case of
> Composites wasn't considered, and so we're seeing double-fire events like
> the one in your code snippet above.
>
> Issue #3211:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=3211
>
> A potential workaround you can use in the case of the SuggestBox would be
> to extend it and override the onBrowserEvent() method once more, this time
> making a single call to onBrowserEvent from the wrapped widget.
>
> E.g.:
>
> public class MySuggestBox extends SuggestBox {
>   @Override
>   public void onBrowserEvent(Event event) {
>     getWidget().onBrowserEvent(event);
>   }
> }
>
> Give that a try and let us know how it goes. Meanwhile, I'll file an issue
> on the tracker for this bug and let you know once it's reported so you can
> follow up on it.
>
> Hope that helps,
> -Sumit Chandel
>
> On Thu, Apr 9, 2009 at 3:20 PM, jchimene <jchim...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> The similar routine from the 1.5.3 library does not have the duplicate
>> calls:
>>
>> com.google.gwt.user.client.ui.Composite.class
>>
>>  @Override
>>  public void onBrowserEvent(Event event) {
>>     // Delegate events to the widget.
>>    widget.onBrowserEvent(event);
>>  }
>>
>> Was this a bugfix for the 1.6 revision? If so, how do I prevent the
>> duplicate call to the SuggestBox widget?
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to