Q:

Target Undefined When Right Clicking In Firefox With Context Menu

I am using code to create a custom context menu. Its working however there is an issue in Firefox. When right clicking on either a Select box/dropdown list or a button it gives me the following error in Firefox:
TypeError: this.target is undefined
[Break On This Error]   Filtered chrome url chrome://browser/content/nsContextMenu.js
nsContextMenu.js (line 162)
TypeError: gContextMenu is null

The following code works in Chrome and Internet Explorer but gives an error in Firefox:
$(document).on("contextmenu",function(e){
        if($(e.target).prop("tagName")=="A"){
         //do something
        }
});

Note that this error only happens in Firefox so far with the following tags when right clicking on them.
<select>
<button> 
<input type='checkbox'>

Text boxes work fine however.
Edit: Ok it seems even with no code inside "contextmenu" function it still gives the error.
Update: This appears to be a Firebug issue in Firefox as no erros appear using Firefox's Developer tools javascript console.

A:

This issue can be solved by disabling Firebug. It is a firebug related issue and not a Firefox bug in itself.

