Bug 181741 - Element with position:fixed stops scrolling at the bottom of the page, but is painted in the right place on Chacos.com.
Summary: Element with position:fixed stops scrolling at the bottom of the page, but is...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 11
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: http://www.chacos.com/US/en/home
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2018-01-17 07:01 PST by Stephanie Poll
Modified: 2018-01-24 08:58 PST (History)
5 users (show)

See Also:


Attachments
A screenshot of what happens when hovering over the element in the safari web inspector. (76.24 KB, image/png)
2018-01-17 07:01 PST, Stephanie Poll
no flags Details
Reduction (536 bytes, text/html)
2018-01-17 16:06 PST, Simon Fraser (smfr)
no flags Details
Patch (8.38 KB, patch)
2018-01-22 13:00 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephanie Poll 2018-01-17 07:01:59 PST
Created attachment 331492 [details]
A screenshot of what happens when hovering over the element in the safari web inspector.

If you scroll to the very bottom of the URL on an iPhone, the fixed top/chat buttons on the side stop moving down with the page, but continue to be painted in the correct place. This happens about 40 pixels from the actual bottom. This causes the click area to be shoved above where the elements appear to be. While scrolling, the element is in the correct position, but after scrolling stops, the element will jump above where it appears to be painted. For visual reference, please see the attached screenshot or watch the video at this link: https://www.screencast.com/t/dDzlXxSIZ
Comment 1 Simon Fraser (smfr) 2018-01-17 12:54:07 PST
I can reproduce.
Comment 2 Radar WebKit Bug Importer 2018-01-17 12:54:28 PST
<rdar://problem/36593581>
Comment 3 Simon Fraser (smfr) 2018-01-17 16:06:53 PST
Created attachment 331553 [details]
Reduction

Seems to happen on pages that have a viewport meta tag that triggers scaling. I'm surprised this is such a basic failure :(
Comment 4 Simon Fraser (smfr) 2018-01-17 18:46:19 PST
So this issue happens when the minimum scale is > 1. FrameView::visualViewportRect() returns a visual viewport that's too big (larger than the document) because it assumes that it can scale the visible rect by the scale (~1.3 on this page).
Comment 5 Simon Fraser (smfr) 2018-01-17 19:04:41 PST
The iOS-only code in FrameView::unscaledMaximumScrollPosition() looks suspicious.
Comment 6 Simon Fraser (smfr) 2018-01-17 19:05:42 PST
Bug 174648 is relevant.
Comment 7 Simon Fraser (smfr) 2018-01-22 13:00:58 PST
Created attachment 331953 [details]
Patch
Comment 8 WebKit Commit Bot 2018-01-23 12:11:15 PST
Comment on attachment 331953 [details]
Patch

Clearing flags on attachment: 331953

Committed r227430: <https://trac.webkit.org/changeset/227430>
Comment 9 WebKit Commit Bot 2018-01-23 12:11:17 PST
All reviewed patches have been landed.  Closing bug.