[Webkit-unassigned] [Bug 106133] New: document.body.scrollTop & document.documentElement.scrollTop differ cross-browser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 4 14:40:56 PST 2013


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

           Summary: document.body.scrollTop &
                    document.documentElement.scrollTop differ
                    cross-browser
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://jsfiddle.net/CbYgk/
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vince.t.malone at gmail.com


Chrome 23 & Safari 6
  document.body.scrollTop - returns the scrollbar location on screen
  document.documentElement.scrollTop - always returns 0

Firefox 17, Opera 12 & IE 10
  document.body.scrollTop - always returns 0
  document.documentElement.scrollTop - returns the scrollbar location on screen

Meaning, webkit vs non-webkit browser swap the values returned.

Here's an interactive example, try it in different browers: http://jsfiddle.net/CbYgk/

sidenote: window.pageYOffset - returns the scrollbar location on screen on all listed browsers.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list