[Webkit-unassigned] [Bug 243813] New: [iOS] Scroll position gets reset when back/forward to a page where no viewport is set.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 10 23:24:25 PDT 2022


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

            Bug ID: 243813
           Summary: [iOS] Scroll position gets reset when back/forward to
                    a page where no viewport is set.
           Product: WebKit
           Version: Safari 15
          Hardware: iPhone / iPad
                OS: iOS 15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: webkit.bugzilla at ramest.net

Created attachment 461540

  --> https://bugs.webkit.org/attachment.cgi?id=461540&action=review

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

-- 
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/20220811/ad9fbef3/attachment-0001.htm>


More information about the webkit-unassigned mailing list