There appears to be a difference between the XUL command and click events.
While my function is called when using the command event, the event object does not include the button property.
I'm trying to figure out: how can I determine which mouse button was pressed without relying on the click event?
Here's a simplified version of the code that showcases my issue:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript">
var showMeTheButton=function(e)
{
alert(e.button);
}
</script>
<button onclick="showMeTheButton(event)" label="Click me with onclick"></button>
<button oncommand="showMeTheButton(event)" label="Click me with oncommand"></button>
</window>