Skip to main content

Bug Tracker

Side navigation

#13155 closed bug (worksforme)

Opened January 04, 2013 09:53PM UTC

Closed January 07, 2013 03:07AM UTC

Last modified May 21, 2013 06:27AM UTC

scrollTop() - $('body') & $('html') not consistent cross-browser (webkit)

Reported by: vince.t.malone@gmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description
$('body').scrollTop()
$('html').scrollTop()

Not returning consistent results from webkit and non-webkit browsers.

Chrome 23 & Safari 6 - $('html').scrollTop() will return 0 regardless of where the scrollbar is.

Firefox 17, Opera 12 and IE 10 - $('body').scrollTop() will return 0 regardless of where the scrollbar is.

Example: http://jsfiddle.net/VGUQ7/7/

I realize this is most likely a webkit issue, but I figured I'd let you know.

Attachments (0)
Change History (2)

Changed January 07, 2013 03:07AM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

Right, so don't use those. Use document as your example shows.

Changed May 21, 2013 06:27AM UTC by softlion comment:2

this bug exists.

With the jsfiddle above:

Chrome: html is always 0, the others are moving.

IE10: body is always 0, the others are moving.