Nate Weiner

This is an old archived post from my former blog The Idea Shower. It's where I cataloged my product explorations and releases, one of which ultimately became Pocket.

This post was published back in 2008. It may not function as originally intended or may be missing images.

Replace Standard Menupop in XUL

July 29, 2008

I came across a time I needed to open a different element then a standard popup menu when clicking the dropdown selector on a toolbar button. I wanted to open a panel instead. To open a different element and hide the popup you can do something similar to this:

<toolbarbutton type="menu-button"> <menupopup onpopupshowing="OpenOtherFunction();event.stopPropagation();return false;" /> </toolbarbutton>
Update: You can do this much more efficiently using XBL Bindings.  I highly recommend reading up on them.

Where I learned it: While working on the Read It Later Firefox Extension