Closed
Bug 10574
Opened 26 years ago
Closed 25 years ago
Page coordinates in event object don't match real position
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: hhedberg, Assigned: joki)
References
()
Details
This bug is at least in Linux / M8.
event.pageX and event.pageY values in event handlers don't match with
real scrolled position. Actual values are cursor position in the
viewable area which is wrong behavior.
Included code produces following output when page has first scrolled to bottom:
Browser Window Alert:
pageY = 293
clientY = 293
screenY = 643
layerY = 1538
So the pageY value is same as clientY although is should be same as layerY.
In Netscape Navigator 4.61 same code produces correct values:
pageY = 1491
clientY = undefined
screenY = 679
layerY = 1491
Code:
<html>
<head>
<title>Bug</title>
<script language="JavaScript">
function showCoords(e) {
alert( "\npageY = " + e.pageY + "\nclientY = " + e.clientY +
"\nscreenY = " + e.screenY + "\nlayerY = " + e.layerY );
return false;
}
function setup() {
for( i = 0; i < 50; i++ )
document.links[ i ].onclick = showCoords;
}
</script>
</head>
<body onload="setup()">
<script language="JavaScript">
for( i = 0; i < 50; i++ )
document.writeln( '<p><a href="">' + i +
" Is this long enoung?</a></p>" );
</script>
</body>
</html>
| Assignee | ||
Updated•25 years ago
|
Target Milestone: M13
| Assignee | ||
Updated•25 years ago
|
Target Milestone: M13 → M14
| Assignee | ||
Comment 1•25 years ago
|
||
Moving off bugs that won't make M13
Updated•25 years ago
|
Target Milestone: M14 → M16
Comment 2•25 years ago
|
||
Moving M16.
| Assignee | ||
Comment 3•25 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 4•25 years ago
|
||
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Comment 6•24 years ago
|
||
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•