Skip to content

Interaction with Safari's back/forward previews #8333

Description

@jakearchibald

Both Safari iOS and Safari Desktop have a feature where you see a 'preview' of the previous history entry when you drag from the edge (iOS) or two-finger swipe (Desktop). This includes same-document traversals.

out.mp4
safari-desktop.mp4

This already causes issues in cases where developers have created their own transition. Demo: https://static-misc-3.glitch.me/basic-navigation-transition/. Here's what happens:

  1. User is on "state 2".
  2. User drags from the left, revealing a screenshot of "state 1".
  3. Navigation commits, but since it's same-document, it's still in "state 1".
  4. Developer gets a popstate event, so they begin a transition from "state 1" to "state 2", meaning it looks like things 'snap back' to "state 2".
out.mp4

It feels like we should avoid this kind of experience with view transitions (both SPA and MPA) at least.

I think a good starting point is: Is there something developers should be doing today to avoid this kind of experience in Safari? If not, we can invent something 😀

@smfr any ideas around this? It seems to be a problem in the wild https://twitter.com/ryanflorence/status/1362095580827160578

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions