Great !!!!

Thanks a lot, Thomas, for your help.
I wish you a nice week-end.

Christophe

On 16 sep, 12:35, redjhawk <[email protected]> wrote:
> Have you tried with event.preventDefault() ?
>
> On Sep 16, 10:35 am, Christophe
>
> <[email protected]> wrote:
> > Ok, that's work. I can display my popup menu. But it doesn't prevent
> > default browser popup menu :http://xemelios.org/private/many-menus.png
>
> > To stop propagation, I've tried this without any success :
> >         public void onBrowserEvent(Cell.Context context, final Element
> > parent, SafeHtml value, final NativeEvent event,
> > ValueUpdater<SafeHtml> valueUpdater) {
> >             event.stopPropagation();
> > ...
>
> > Any idea ?
>
> > Thanks in advance,
> > Christophe
>
> > On 15 sep, 17:23, Thomas Broyer <[email protected]> wrote:
>
> > > Where is this sinkEvents from?
>
> > > class SafeHtmlCellWithContextMenu<T> extends SafeHtmlCell {
> > >   public Set<String> getConsumedEvents() { return
> > > Collections.singleton("contextmenu"); }
>
> > >   public void onBrowserEvent(Cell.Context context, Element parent, 
> > > SafeHtml
> > > value, NativeEvent event, ValueUpdater<SafeHtml> valueUpdater) {
> > >     // here, event.getType() should be "contextmenu"
> > >   }
>
> > > }
>
> > > Then use with: newHeader(new SafeHtmlCellWithContextMenu());
>
> > > (best IMO would be to turn the above into a generic Cell that can wrap any
> > > other Cell, delegating everything to the wrapped cell, except for
> > > getConsumedEvents to add "contextmenu" to the list, and onBrowserEvent to
> > >handlethe "contextmenu")

-- 
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