Bug Tracker

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#8425 closed bug (duplicate)

scrollTop inconsistency

Reported by: derek@… Owned by: derek@…
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

Change History (5)

comment:1 Changed 9 years ago by Rick Waldron

Component: unfiledoffset
Owner: set to derek@…
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!

comment:2 Changed 9 years ago by trac-o-bot

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!

comment:3 Changed 8 years ago by timmywil

Resolution: invalid
Status: closedreopened

comment:4 Changed 8 years ago by timmywil

Resolution: duplicate
Status: reopenedclosed

comment:5 Changed 8 years ago by timmywil

Duplicate of #10419.

Note: See TracTickets for help on using tickets.