Bug 262589

Summary: REGRESSION (Safari 17): Scroll position not restored on page back after case-sensitive navigation
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: achristensen, beidson, cdumez, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   

Description Jeff Johnson 2023-10-03 17:00:52 PDT
Steps to reproduce:
1. Open https://www.reddit.com/r/askreddit/ in Safari 17
2. Scroll down the page
3. Click on a link to open an article
4. Click the back button in the toolbar

Expected results: The previous scroll position is restored.

Actual results: The scroll position is at the top of the page.

Discussion:
This bug occurs in Safari 17 but not in Safari 16.

The bug does not occur if you open https://www.reddit.com/r/AskReddit/ in step 1.

I'm having difficulty producing a reduced test case, because I'm using a Mac, which has a case-insensitive file system. What's happening on Reddit is that it calls window.location.replace("/r/AskReddit/") to redirect from the lowercase /r/askreddit/, which seems to be the cause of the bug in Safari 17.
Comment 1 Radar WebKit Bug Importer 2023-10-04 13:19:15 PDT
<rdar://problem/116482078>
Comment 2 Chris Dumez 2023-12-15 08:27:49 PST
This didn't reproduce for me on Safari 17.2.
Comment 3 Jeff Johnson 2023-12-15 09:04:16 PST
Hmm, I can't reproduce it anymore either.

I don't know whether that's due to Safari changing or Reddit changing.
Comment 4 Chris Dumez 2023-12-15 09:31:02 PST
Works for me and Nick. Not sure if the fix was on server side or WebKit side.