Bug 243813

Summary: [iOS] Scroll position gets reset when back/forward to a page where no viewport is set.
Product: WebKit Reporter: Kyouhei Horizumi <kyouhei.horizumi>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
Steps to reproduce none

Kyouhei Horizumi
Reported 2022-08-10 23:24:25 PDT
Created attachment 461540 [details] Steps to reproduce Case 1: Scroll position gets reset when back/forward to a page where no viewport is set. https://webkit-reset-scrolly-when-history-back.pages.dev/ Case 2: If viewport.width is specified, it will not be reset. e.g. `<meta name="viewport" content="width=device-width">` https://webkit-reset-scrolly-when-history-back.pages.dev/set-viewport-device-width/ Case 3: However, if any elements extend beyond the <body>, they will be reset. e.g. `div {inline-size: calc(100% + 1px);}` https://webkit-reset-scrolly-when-history-back.pages.dev/set-viewport-device-width/over-body-area/ Case 4: Even in that case, if initial-scale is set, it will not be reset. e.g. `<meta name="viewport" content="width=device-width, initial-scale=1.0">` https://webkit-reset-scrolly-when-history-back.pages.dev/set-viewport-device-width/over-body-area/set-initial-scale In all cases, pinch-in in preserves the scroll position. ---------------------- Steps to reproduce: Please see attachment (README.jpg). Expected: Restore scroll position all cases. Additional info: - iOS 15.6 / iPhone SE (2nd Generation) - Mobile Safari
Attachments
Steps to reproduce (194.61 KB, image/jpeg)
2022-08-10 23:24 PDT, Kyouhei Horizumi
no flags
Simon Fraser (smfr)
Comment 1 2022-08-11 20:43:07 PDT
Radar WebKit Bug Importer
Comment 2 2022-08-17 23:25:18 PDT
Kyouhei Horizumi
Comment 3 2023-01-10 07:16:59 PST
Confirmed fixed in iOS 16.1.1 (20B101).
Note You need to log in before you can comment on or make changes to this bug.