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 <[email protected]> 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]
--~--~---------~--~----~------------~-------~--~----~
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