Skip to main content

Bug Tracker

Side navigation

#8425 closed bug (duplicate)

Opened March 02, 2011 07:44PM UTC

Closed October 04, 2011 06:52PM UTC

Last modified March 14, 2012 12:56PM UTC

scrollTop inconsistency

Reported by: derek@echologic.com Owned by: derek@echologic.com
Priority: undecided Milestone: 1.next
Component: offset Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

iOS 4.2 UIWebView (safari?)

$(window).scrollTop() returns a good position

$(window).scrollTop(position) fails to reposition the window

$('body').scrollTop() returns a good position

$('body').scrollTop(position) successfully repositions the window

FF 3.6.12 with firebug 1.6.0

$(window).scrollTop() returns a good position

$(window).scrollTop(position) fails with

TypeError: $(element).offset() is null

$('html,body').animate({scrollTop: $(element).offset().top}

$('body').scrollTop() fails to return a good position

$('body').scrollTop(position) fails to reposition the window

I'm not sure what the "correct" way to get and set the window scroll position is, but it seems like $(window).scrollTop() and $(window).scrollTop(n) are probably it.

Thanks,

Derek

Attachments (0)
Change History (5)

Changed March 07, 2011 12:49AM UTC by rwaldron comment:1

component: unfiledoffset
owner: → derek@echologic.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

Changed March 21, 2011 07:57AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed October 04, 2011 06:51PM UTC by timmywil comment:3

resolution: invalid
status: closedreopened

Changed October 04, 2011 06:52PM UTC by timmywil comment:4

resolution: → duplicate
status: reopenedclosed

Changed October 04, 2011 06:52PM UTC by timmywil comment:5

Duplicate of #10419.