[Project_owners] Display right-click context menu programmatically

Michael Vincent van Rantwijk, MultiZilla mv_van_rantwijk at yahoo.com
Mon Jul 9 02:11:32 PDT 2007

Neil wrote:
> Todd Long wrote:
>> I'm having trouble trying to display the right-click context menu 
>> programmatically (without having to actually right-click). I continue 
>> to get an exception (see below) that I can't seem to get around and 
>> was hoping someone else might have a better idea/solution. What I've 
>> done is setup a window event listener for "click" that executes my 
>> code below. I'm checking for the left mouse button before attempting 
>> to show the right-click context menu (popup). Any suggestions/help 
>> would be great.
> The internal popup code does all sorts of other stuff before actually 
> calling showPopup. In particular, it sets document.popupNode, 
> document.popupRangeParent and document.popupRangeOffset, of which the 
> latter two are apparently needed for spellchecking. Although you can set 
> document.popupNode through script the other two are readonly so you 
> appear to be out of luck.

What? showPopup() can no longer be used from JS in Mozilla Firefox?  Or 
do you mean in this specific case; where someone wants to use 
showPopup() to open the context menu?

Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member
- iPhone Application Developer

More information about the Project_owners mailing list