Bug 220676 - Scroll position is lost when homing out and resuming Safari on iOS
Summary: Scroll position is lost when homing out and resuming Safari on iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-15 16:41 PST by Simon Fraser (smfr)
Modified: 2021-01-19 10:57 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2021-01-15 16:45 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 Simon Fraser (smfr) 2021-01-15 16:41:43 PST
Scroll position is lost when homing out and resuming Safari on iOS
Comment 1 Simon Fraser (smfr) 2021-01-15 16:45:16 PST
Created attachment 417749 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-01-15 16:45:45 PST
<rdar://problem/71534598>
Comment 3 EWS 2021-01-15 19:44:43 PST
Committed r271551: <https://trac.webkit.org/changeset/271551>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417749 [details].
Comment 4 Geoffrey Garen 2021-01-19 10:53:24 PST
I believe we have code that avoids sending certain JS events during snapshotting (resize and orientation). Maybe it would be less risky to run the scrolling code and just avoid sending the JS event that would trigger programmatic scroll?
Comment 5 Simon Fraser (smfr) 2021-01-19 10:57:02 PST
The programmatic scroll is not from JS. It's from layout (when you layout narrow, and then wide, you may need to adjust your scroll offset because the current one is no longer valid).