[Webkit-unassigned] [Bug 199691] The whole viewport shifts down when resetting document scrollTop

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 13 21:27:01 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199691

--- Comment #4 from Xidorn Quan <xidorn-webkit at upsuper.org> ---
(In reply to Simon Fraser (smfr) from comment #3)
> document.addEventListener('scroll', evt => {
>   document.documentElement.scrollTop = 0;
>   document.body.scrollTop = 0;
> });
> 
> This is a really bad pattern that we see commonly; if you rubber-band the
> content, it will also try to set the scrollTop back to 0.

I feel like this is potentially an anti-pattern, but how would you recommend for the case where author may want to move the element manually, for example, when they want to zoom to the current visible area?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190714/73b670fd/attachment-0001.html>


More information about the webkit-unassigned mailing list