sveltejs / sveltejs/kit

iOS back motion inconsistency

Open
#13,117 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

The back motion on iOS in dependent on the scroll position of the page you are currently on.

When on the very top of page A and going back from page A to page B, you will see page B below page A during the motion.
However, if you scroll page A down before doing the back motion then you will see a blank page below page A.

https://github.com/user-attachments/assets/830583e5-1d3a-493d-9456-e41af8f28ca1

Reproduction

On iOS device.

Create svelte demo project via:
https://svelte.dev/docs/kit/creating-a-project

Add this to package.json scripts:
"dev-phone": "vite dev --host "

  1. Execute: npm run dev-phone
  2. Navigate from Home to About through navbar
  3. Execute back motion on iOS (works as expected)
  4. Navigate from Home to About through navbar
  5. Scroll to the bottom of about
  6. Execute back motion on iOS (page below about is blank)
Logs

No response

System Info
Device:
iPhone 13
iOS 18.1.1
Safari
Severity

annoyance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Create the Svelte demo project using the linked project guide and add the package.json dev-phone script. Reproduce the back motion on an iPhone 13 with Safari both at the top of About and after scrolling to its bottom. Trace the navigation behavior from the Home-to-About reproduction; done means the page below About is rendered consistently during back motion in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.