Do not use right-mouse click popup menu. This is not supported by all
browsers. For instance, in Opera you should change configuration in
order to allow scripts to handle context menu events. Instead you can
detect mouse-over event, and depending of object which is hovered, you
can display a panel that contain options (Just like MS Word does, or
GMail when you select picture).


On Nov 3, 6:46 am, Taimur Mirxa <taim...@gmail.com> wrote:
> Mike,
>
> I really appreciate your help, but this is not working in firefox. on the
> other side this method is working fine in hosted mode and IE. any idea?
>
> On Mon, Nov 2, 2009 at 12:04 PM, Michael Sullivan <msull...@yahoo.com>wrote:
>
>
>
>
>
>
>
> > In your client code somewhere, create this native function:
> >        protected native void blockBrowserContextMenu(Element elem) /*-{
> >            elem.oncontextmenu = function(e) {
> >              return false;
> >            };
> >          }-*/;
>
> > Then, when you create your RichTextArea, call 'getElement()' on your
> > RTA instance and pass it to the given native method.
> > That will block browser context menus for that instance of
> > RichTextArea and for no other part of your UI.  (Though you may want
> > to consider
> > re-implementing Cut/Copy/Paste on your custom menu, as they may be
> > expected by your users).
>
> > Mike
>
> > On Nov 2, 8:39 am, Taimur Mirxa <taim...@gmail.com> wrote:
> > > Folks,
>
> > > I have created my own popup menu, which I want to display in
> > RichTextArea,
> > > and it is appearing with right mouse click. my problem is that default
> > > broswer's context menu does also appear along with my menu. is there any
> > > resolution for this?
>
> > > I have seen lots of examples and code but all of them were disabling
> > > broswer's default menu that shows View Source and other options, I do not
> > > want to disable it, rather my point is to disable the context menu which
> > > appears in text fields or rich text areas.
>
> > > --
> > > Warm Regards,
>
> > > Taimur Mirza
>
> > > [To predict the behavior of ordinary people in advance, you only have to
> > > assume that they will always try to escape a disagreeable situation with
> > the
> > > smallest possible expenditure of intelligence.  - Friedrich Nietzsche]
>
> --
> Warm Regards,
>
> Taimur Mirza
>
> [To predict the behavior of ordinary people in advance, you only have to
> assume that they will always try to escape a disagreeable situation with the
> smallest possible expenditure of intelligence.  - Friedrich Nietzsche]
--~--~---------~--~----~------------~-------~--~----~
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