jQuery: Ticket #8425: scrollTop inconsistencyhttps://bugs.jquery.com/ticket/8425
<p>
iOS 4.2 UIWebView (safari?)
</p>
<p>
$(window).scrollTop() returns a good position
$(window).scrollTop(position) fails to reposition the window
</p>
<p>
$('body').scrollTop() returns a good position
$('body').scrollTop(position) successfully repositions the window
</p>
<p>
FF 3.6.12 with firebug 1.6.0
</p>
<p>
$(window).scrollTop() returns a good position
$(window).scrollTop(position) fails with
TypeError: $(element).offset() is null
$('html,body').animate({scrollTop: $(element).offset().top}
</p>
<p>
$('body').scrollTop() fails to return a good position
$('body').scrollTop(position) fails to reposition the window
</p>
<p>
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.
</p>
<p>
Thanks,
Derek
</p>
en-usjQuery//jquery.com/images/logo.gifhttps://bugs.jquery.com/ticket/8425
Trac 1.2.5Rick WaldronMon, 07 Mar 2011 00:49:16 GMTstatus, component changed; owner sethttps://bugs.jquery.com/ticket/8425#comment:1
https://bugs.jquery.com/ticket/8425#comment:1
<ul>
<li><strong>owner</strong>
set to <em>derek@…</em>
</li>
<li><strong>status</strong>
changed from <em>new</em> to <em>pending</em>
</li>
<li><strong>component</strong>
changed from <em>unfiled</em> to <em>offset</em>
</li>
</ul>
<p>
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
</p>
<p>
Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!
</p>
Tickettrac-o-botMon, 21 Mar 2011 07:57:33 GMTstatus changed; resolution sethttps://bugs.jquery.com/ticket/8425#comment:2
https://bugs.jquery.com/ticket/8425#comment:2
<ul>
<li><strong>status</strong>
changed from <em>pending</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>invalid</em>
</li>
</ul>
<p>
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!
</p>
TickettimmywilTue, 04 Oct 2011 18:51:58 GMTstatus changed; resolution deletedhttps://bugs.jquery.com/ticket/8425#comment:3
https://bugs.jquery.com/ticket/8425#comment:3
<ul>
<li><strong>status</strong>
changed from <em>closed</em> to <em>reopened</em>
</li>
<li><strong>resolution</strong>
<em>invalid</em> deleted
</li>
</ul>
TickettimmywilTue, 04 Oct 2011 18:52:07 GMTstatus changed; resolution sethttps://bugs.jquery.com/ticket/8425#comment:4
https://bugs.jquery.com/ticket/8425#comment:4
<ul>
<li><strong>status</strong>
changed from <em>reopened</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>duplicate</em>
</li>
</ul>
TickettimmywilTue, 04 Oct 2011 18:52:09 GMThttps://bugs.jquery.com/ticket/8425#comment:5
https://bugs.jquery.com/ticket/8425#comment:5
<p>
Duplicate of <a class="closed ticket" href="https://bugs.jquery.com/ticket/10419" title="#10419: bug: error in google chrome (closed: invalid)">#10419</a>.
</p>
Ticket