Description
openedon Feb 21, 2024
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
- Search https://openverse.org for images, filtered by the Sketchfab provider (example
- Select a single result
- After the result loads, use the browser back button to return to search results
- 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
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog