[Webkit-unassigned] [Bug 26020] New: The offsetLeft of an element with non-absolute position whose offsetParent is the position:static body does not include the html element's left margin

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 26 07:19:33 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26020

           Summary: The offsetLeft of an element with non-absolute position
                    whose offsetParent is the position:static body does not
                    include the html element's left margin
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: aharon at google.com


If you have:

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      html {margin-left: 10px}
      body {margin: 0px}
    </style>
  </head>
  <body>
    <div id="static">static</div>
    <div id="absolute" style="position:absolute">absolute</div>
  </body>
</html>

Then static.offsetLeft is 0. It should be 10, i.e. include the html margin, the
same as absolute.offsetLeft. It already includes the html left border and
padding and the body left margin and border and padding. This is the way it is
in IE8, and it makes sense. In IE7, it only includes the body padding, which is
a bug they fixed in IE8.


-- 
Configure bugmail: https://bugs.webkit.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