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
Possibly fixed by https://commits.webkit.org/253221@main
<rdar://problem/98816743>
Confirmed fixed in iOS 16.1.1 (20B101).