Skip to content

Sketchfab single result loading adds to browser session history #3816

Open

Description

Description

tl;dr: You have to press the back button twice to return to the search results after viewing a Sketchfab single result

Details

In Firefox, the deferred loading of the Sketchfab script or iframe (TBD) pushes an extra, blank state into the browser session history. This causes the user to have to press the browser back button twice when returning to the search results.

Reproduction

  1. Search https://openverse.org for images, filtered by the Sketchfab provider (example
  2. Select a single result
  3. After the result loads, use the browser back button to return to search results
  4. Observe that the button needed to be pressed twice

Screenshots

A video of some of the behavior:

Screencast.from.2024-02-20.22-31-43.webm

Environment

  • Device:
  • OS: Debian GNU/Linux 12 (bookworm) x86_64
  • Browser: Firefox
  • Version: 115.7.0esr

Additional context

This is most likely related to the custom approach we're taking to dynamically load the Sketchfab viewer javascript and render the iframe. Perhaps some new security feature in Firefox or other async loading functionality has caused this behavior.

The relevant component: https://github.com/WordPress/openverse/blob/ea17972522d59a56dec2f08e8a2fa68230992dcc/frontend/src/components/VSketchFabViewer.vue

And the file for dynamic script loading: https://github.com/WordPress/openverse/blob/ea17972522d59a56dec2f08e8a2fa68230992dcc/frontend/src/components/VSketchFabViewer.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions