event.offsetX and event.offsetY should be mouse coordinates relative to padding-box of target node

The following grid image is 100 pixels wide by 100 pixels high. It has a 1px dotted red border around it and a padding-left and padding-top of 150 pixels. In Internet Explorer 6 and in Internet Explorer 7, the property event.offsetX/event.offsetY return the x/y mouse coordinates within the target element according to the padding box, not according to the content box.

Steps to reproduce: Click exactly inside the green square exactly in the middle of the grid.

Expected results: event.offsetX should be 200 (not 50), event.offsetY should be 200 (not 50).

Image download support must be enabled







event.offsetX
event.offsetY



event.offsetX property definition at MSDN

CSSOM View Module Reference (W3C Working Draft 17 December 2013) states:
The offsetX attribute, on getting, must return the x-coordinate of the position where the event occurred relative to the origin of the padding edge of the target node.
The offsetY attribute, on getting, must return the y-coordinate of the position where the event occurred relative to the origin of the padding edge of the target node.

Internet Explorer 6, Internet Explorer 7, Safari 3.1, Safari 4.0, Konqueror 3.5.8, Konqueror 4.1.0 all pass this test.

This bug has been reported at connect's IE beta feedback as bug 362142.

This bug has been reported at Opera Bug Tracking System as bug 123306.

Valid HTML 4.01! CSS compliant