Skip to content

Conversation

@jacbn
Copy link
Contributor

@jacbn jacbn commented Oct 30, 2025

Owing to some iOS quirk, window.scrollTo does not immediately work on page load. This PR adjusts the on-page-load logic to use a safe version of scrollTo that adds a small delay, ensuring this behaves as expected on all devices.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.59%. Comparing base (a1d86f8) to head (70cbdd0).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/app/services/scrollManager.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1807      +/-   ##
==========================================
+ Coverage   41.57%   41.59%   +0.01%     
==========================================
  Files         543      543              
  Lines       23746    23752       +6     
  Branches     7865     7865              
==========================================
+ Hits         9873     9879       +6     
  Misses      13830    13830              
  Partials       43       43              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barna-isaac
Copy link
Contributor

@jacbn has okayed my suggested decorate function.

Other than this, on an iPad running the latest iOS, I've been able to reproduce a very minorly misaligned top scroll on Books -> Quantum Mechanics Primer on the live site, which I've indeed not been seeing on the dev site (where I've deployed this code). On Chrome desktop, the old and new site both work. Looks good to me!

Another thing I've discussed with @jacbn is that we both wish we didn't need to include manual workarounds to help react router do its job. Thankfully, react router does provide this functionality nowadays -- it's just that the old version we use does not. Hopefully, once we've upgraded react router, we'll be able to get rid of these brittle, browser-specific hacks altogether.

@barna-isaac barna-isaac merged commit 9000ed7 into main Oct 31, 2025
14 checks passed
@barna-isaac barna-isaac deleted the hotfix/improve-scroll-behaviour-ios branch October 31, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants