:: Forum >>

oncontextmenu and FF

I'm trying to figure out why in FF it requires me to double right click to trigger the oncontextmenu event. My right click menu works fine in IE but in FF I have to double click.

I am using the "Standard Edition - Site License".

Here is some sample code:

File: [i]xml_test.cgi[/i]

#!/usr/bin/perl

print <<END;
Content-Type: text/xml; charset=ISO-8859-1

<companies>
<company>
<ticker>MSFT</ticker>
<name>Microsoft Corporation</name>
<mktcap>314,571.156</mktcap>
<sales>32,187.000</sales>
<employees>55000</employees>
</company>
<company>
<ticker>ORCL</ticker>
<name>Oracle Corporation</name>
<mktcap>62,615.266</mktcap>
<sales>9,519.000</sales>
<employees>40650</employees>
</company>
<company>
<ticker>SAP</ticker>
<name>SAP AG (ADR)</name>
<mktcap>40,986.328</mktcap>
<sales>8,296.420</sales>
<employees>28961</employees>
</company>
<company>
<ticker>CA</ticker>
<name>Computer Associates Inter</name>
<mktcap>15,606.335</mktcap>
<sales>3,164.000</sales>
<employees>16000</employees>
</company>
<company>
<ticker>ERTS</ticker>
<name>Electronic Arts Inc.</name>
<mktcap>14,490.895</mktcap>
<sales>2,503.727</sales>
<employees>4000</employees>
</company>
</companies>
END


File: [i]test.html[/i]

<html>
<head>
<script src="/ActiveWidgets/runtime/lib/aw.js"></script>
<link href="/ActiveWidgets/runtime/styles/aqua/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>
var d = new Date();
var data = new AW.XML.Table;
data.setURL('/cgi-bin/xml_test.cgi?' + d.getTime());
data.request();

var headers = [ "Ticker",
"Name",
"Mkt Cap",
"Sales",
"Employees",
];

var obj = new AW.Grid.Extended;
obj.setId('myGrid');
obj.setStyle('width', '700');
obj.setStyle('height', '300');
obj.setColumnCount(5);
obj.setHeaderText(headers);
obj.setCellModel(data);
obj.setVirtualMode(true);

obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectorVisible(true);
obj.setSelectorResizable(true);
obj.setHeaderHeight(20);
obj.setSelectorWidth(25);
obj.setRowCount(5000);

obj.setCellEditable(false); // disable editing
obj.setSelectionMode("multi-row");

document.write(obj);
// End Main Grid ######################################

// html event handler translates to grid events
function raiseMenuEvent(event){
this.raiseEvent("onRowContextMenu", event, this.$0);
}

// assign html event handler to row template
obj.setEvent("oncontextmenu", raiseMenuEvent);


// assign grid event handler
obj.onRowContextMenu = function(event, row){
alert("row=" + row + " x=" + event.clientX + " y=" + event.clientY);
}
</script>
</body>
</html>
Mike
Saturday, September 16, 2006
Any Ideas?
Mike
Monday, September 18, 2006
Mike, I found it is related to :
obj.setSelectionMode("multi-row");
Cause if you remove it ( default & same as define single-cell)..or replace with single-row then FF works as IE.
But not sure wich is the best way to fix it.
HTH
Carlos
Monday, September 18, 2006
Alex, is there any way to get around this in FF? I need to keep it on multi-select and I also need to have a right click menu without telling everyone they just have to double right click.

Not to mention the double right click also appears to trigger the doubleclick event which does something entirely different also.
Mike
Monday, September 18, 2006
bump
Mike
Tuesday, September 19, 2006
I have same problem in FF with oncontextmenu when selection mode is set to "multi-row". A double-click is required to trigger the oncontextmenu event. Does anyone have a workaround?
CK
Tuesday, January 2, 2007
When using multi-row selection mode in FF, the grid seems to consume right mouse button events without triggering the oncontextmenu, onmousedown, etc events. Any ideas?
CK
Tuesday, January 9, 2007
bump
CK
Wednesday, January 10, 2007
Any fix for this yet????
Jon
Friday, June 22, 2007
Is this fixed in the new beta???
Jon
Friday, December 7, 2007

This topic is archived.


Back to support forum

Forum search