[Webkit-unassigned] [Bug 8128] New: event.clientY is improperly implemented

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sat Apr 1 18:12:02 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=8128

           Summary: event.clientY is improperly implemented
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
               URL: http://www.gtalbot.org/Shieldhost/DHTMLSection/WindowEve
                    ntsNS6.html
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: browserbugs at gtalbot.org


After a few email exchanges with Beau Hartshorne, author of the article
JavaScript Events January 18, 2006
http://hartshorne.ca/2006/01/18/javascript_events/
on event properties and browser support and after checking myself in an
Internet Cafe with Safari 2.02 (416.13) this page
http://www.gtalbot.org/Shieldhost/DHTMLSection/WindowEventsNS6.html
I am convinced that Safari incorrectly implements event.clientX and
event.clientY

Expected results:
event.pageY = event.clientY + [amount scrolled down from top of page]
or, in Safari,
event.pageY = event.clientY + document.body.scrollTop
or
event.pageY = event.clientY + window.pageYOffset
or
event.pageY = event.clientY + window.scrollY

DOM 2 Events defines these event.clientX and clientY as related to the client
area, not related to whole document width or to whole document height.

event.clientX :
"The horizontal coordinate at which the event occurred relative to the DOM
implementation's client area."
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-MouseEvent-clientX

event.clientY:
"The vertical coordinate at which the event occurred relative to the DOM
implementation's client area."
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-MouseEvent-clientY

Right now, there is also an unanimity of implementing event.clientX and
event.clientY in Opera 7+, Mozilla 1.x, Seamonkey 1.x, Firefox 1.x and MSIE 6.
Only Safari 2.x seems to take the x/y-coordinate of the (whole) document as the
event.clientX/Y instead of the x/y-coordinate of the viewing area.

This bug is important to fix so that DHTML applications (relying on
measurement, coordinating, positioning, etc.) can work reliably across
browsers.

Peter-Paul Koch, at this precise url
http://www.quirksmode.org/dom/w3c_events.html#mousepos
also confirms the erroneous implementation of event.clientX/clientY in Safari:
"Safari gives the mouse coordinates relative to the document which it also
gives in pageX/Y."

I set version to 420+ since Beau Hartshorne data indicate that the incorrect
implementation still exists in 417 / 420 .

I have searched for duplicates and did not find any. I set Component to
JavaScript even though this bug is not a javascript engine bug; there does not
seem to be any better component.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list