WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
273617
Scroll position is (sometimes) not correctly restored after restoring a page from the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=273617
Summary
Scroll position is (sometimes) not correctly restored after restoring a page ...
Daniel
Reported
2024-05-02 02:42:39 PDT
Created
attachment 471249
[details]
Video showing how the scroll position is not correctly restored when going back, and back/forwards How to reproduce quite reliably on a test page: 1. Go to
https://webkit-bfcache-scroll-restore-bug.myshopify.com/collections/all
2. Enter password rtamay 3. Scroll down a bit (maybe to product 50) 4. Click a product 5. Go back Expected behavior: The scroll position is restored to where one left off Actual behavior: there's sometimes some glitching but 3/4 times one ultimately ends up at nearly the top of the page, as can be seen in the attached video on latest ios safari (Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1). The scroll position is correctly restored in all other browsers and also on desktop safari, just not iOS. It has something to do with the back/forward cache because when just reloading the page the scroll position is correctly maintained.
Attachments
Video showing how the scroll position is not correctly restored when going back, and back/forwards
(8.10 MB, video/mp4)
2024-05-02 02:42 PDT
,
Daniel
no flags
Details
Screenshot from a `setInterval(log, 0)` that I had running on the page showing scroll position over time - safari briefly restores the correct scroll position before going back to the wrong one
(1.18 MB, image/jpeg)
2024-05-02 02:44 PDT
,
Daniel
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Daniel
Comment 1
2024-05-02 02:44:08 PDT
Created
attachment 471250
[details]
Screenshot from a `setInterval(log, 0)` that I had running on the page showing scroll position over time - safari briefly restores the correct scroll position before going back to the wrong one
Radar WebKit Bug Importer
Comment 2
2024-05-06 12:59:13 PDT
<
rdar://problem/127620537
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug