Bug 69787: Implement MSIE's event.offsetX, event.offsetY as mouse coordinates inside target element

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 element, including the padding but excluding borders. event.offsetX/event.offsetY return the 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).

grid image







event.offsetX
event.offsetY



event.offsetX property definition at MSDN

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

Valid HTML 4.01!     Valid CSS!