97611 - Autocomplete popup event coordinates miscalculated (from neil@parkwaycc.co.uk), r=jag, sr=hewitt

This commit is contained in:
hewitt%netscape.com 2001-10-03 02:59:17 +00:00
parent aa050fb3a4
commit 6448d3a303

View File

@ -1469,13 +1469,10 @@
<method name="getHoverCell">
<parameter name="aEvent"/>
<body><![CDATA[
var obox = this.textbox.view.outlinerBoxObject;
var pbox = this.textbox.resultsPopup.boxObject;
var row = {}; var col = {}; var obj = {};
var x = aEvent.screenX-pbox.screenX + this.boxObject.x;
var y = aEvent.screenY-pbox.screenY + this.boxObject.y;
obox.getCellAt(x-1, y-1, row, col, obj);
var x = aEvent.screenX - this.boxObject.screenX + this.boxObject.x;
var y = aEvent.screenY - this.boxObject.screenY + this.boxObject.y;
this.textbox.view.outlinerBoxObject.getCellAt(x, y, row, col, obj);
if (row.value >= 0 && row.value < this.textbox.view.rowCount)
return {row: row.value, column: col.value};
else