[Project_owners] onpopupshowing event - many more sections show up in context menu

danvb30-firefox at yahoo.com danvb30-firefox at yahoo.com
Mon Dec 12 21:04:07 EST 2005


I'm a Firefox extension author newbie, and I'm getting some funny behavior with the
"onpopupshowing" event of the popup object.

In my .xul file, I have the popup declared, with the 2 menuitem objects.  This creates the context
menu entries that I want - all is well. 

Now I'm trying to add some code to dynamically remove my menu items if nothing is selected in the
browser.  To do this, I register the "onpopupshowing" event, pointing to my function.

As soon as I register this event, even if I dont have any code in the handler, I now get a much
larger context menu, with a bunch of extra context menu "sections".  When I remove the event
handler from the .xul description, the context menu goes back down to what it was previously.

It seems like as soon as I have a handler, the menu mechanism is interacting somehow with other
extensions and adding their context menus, when previously they weren't added (when I don't have
the handler)?

Rather than describe the different sections and what I'm seeing, I took a couple screenshots and
put them here.
http://www.volleynerd.com/firefox/extensions/contextmenu.htm

Any clues on what's going on here?



More information about the Project_owners mailing list