Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Overlaying menu items in a XUL textbox's context menu

17 views
Skip to first unread message

steve

unread,
Nov 16, 2009, 2:48:09 AM11/16/09
to
Hello All,

I have a textbox, and I'd like to enhance its context menu. The best
I've been able to do is to assign a menupopup's id to the textbox's
"context" attribute, which overrides the context menu rather than
adding to it.

In the browser, I'm able to overlay new context menu items by matching
the "contentAreaContextMenu" id. Is there an analogous ID for XUL
context menus?

I've looked at
http://weblogs.mozillazine.org/weirdal/archives/009103.html

Not only is that 4 years old, but I was not able to follow it.

Has anyone accomplished this?

Neil

unread,
Nov 16, 2009, 4:53:19 AM11/16/09
to
steve wrote:

>In the browser, I'm able to overlay new context menu items by matching the "contentAreaContextMenu" id. Is there an analogous ID for XUL context menus?
>
>

No; each XUL textbox has its own context menu created in XBL.

--
Warning: May contain traces of nuts.

steve

unread,
Nov 16, 2009, 11:02:41 AM11/16/09
to

Thanks for this... so if I'm understanding correctly if one wants to
add menu items to a textbox's context menu (as opposed to replacing
the context menu wholesale) the only way is to write XBL that extends
the textbox and probably its contained input-box as well.

Neil

unread,
Nov 17, 2009, 8:07:47 AM11/17/09
to
steve wrote:

>so if I'm understanding correctly if one wants to add menu items to a textbox's context menu (as opposed to replacing the context menu wholesale) the only way is to write XBL that extends the textbox and probably its contained input-box as well.
>
>

I don't think you should need to extend the textbox, but you would have
to extend the input-box.

0 new messages