Fix bug 290878. client* coords are broken for events in a popup....

r=neil/mconnor, sr=roc, a=asa
This commit is contained in:
bzbarsky%mit.edu 2005-04-24 20:15:31 +00:00
Родитель f46a4c67fd
Коммит a8e9cc7e20
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -721,8 +721,10 @@
<parameter name="aEvent"/>
<body><![CDATA[
var row = {}; var col = {}; var obj = {};
var x = aEvent.screenX - this.boxObject.screenX + this.boxObject.x;
var y = aEvent.screenY - this.boxObject.screenY + this.boxObject.y;
// XXXbz We really want client*, but event.client* is bogus inside a
// popup!
var x = aEvent.screenX - document.documentElement.boxObject.screenX;
var y = aEvent.screenY - document.documentElement.boxObject.screenY;
this.parentNode.treeBoxObject.getCellAt(x, y, row, col, obj);
if (row.value >= 0)
return {row: row.value, column: col.value.id};

Просмотреть файл

@ -1537,8 +1537,10 @@
<parameter name="aEvent"/>
<body><![CDATA[
var row = {}; var col = {}; var obj = {};
var x = aEvent.screenX - this.boxObject.screenX + this.boxObject.x;
var y = aEvent.screenY - this.boxObject.screenY + this.boxObject.y;
// XXXbz We really want client*, but event.client* is bogus inside a
// popup!
var x = aEvent.screenX - document.documentElement.boxObject.screenX;
var y = aEvent.screenY - document.documentElement.boxObject.screenY;
this.textbox.view.treeBoxObject.getCellAt(x, y, row, col, obj);
if (row.value >= 0)
return {row: row.value, column: col.value.id};