Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13155 closed bug (worksforme)

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

Reported by: vince.t.malone@… 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.

Change History (2)

comment:1 Changed 6 years ago by dmethvin

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 6 years ago by softlion

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.

Note: See TracTickets for help on using tickets.