oxidecomputer / oxidecomputer/console

Flicker on swipe forward/back in mobile Safari

Open
#2,182 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
228
Forks
22
Avg merge
19h 42m
Merged PRs (30d)
32

Description

Low priority because mobile is low priority in general, plus this isn't broken, it just looks weird. Same issue as https://github.com/remix-run/react-router/issues/10883.

Noticed this while checking out the preview on my phone. When I use swipe gestures to go back and forward, I get a weird flicker. Say I'm on page A, I navigate to B, then I swipe back. First it loads its screenshot of what A looked like before (good), then it cuts back to what the page is currently showing (page B with a loading bar while page A's loaders run), then finally it lands back on showing A again once the RR nav happens. Using the back and forward buttons like in a desktop browser does not have this problem because there is no preview image being shown.

Apparently this is a pretty old issue with SPAs, judging by this 2014 SO question. There's a suggested workaround here that involves hacking scroll position to mess with how Safari decides what image to use for its preview of the previous page.

https://github.com/oxidecomputer/console/assets/3612203/3f808671-6914-45fc-91ba-de74b04d3ac9

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

No source file or test is identified in the issue. Start by reproducing the swipe back/forward flow on mobile Safari using the preview, then trace the navigation and loading behavior involved; done means the intermediate flicker no longer appears while desktop back and forward behavior remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.