Skip to content

Link to external site would navigate preview iframe with no way to reset #1122

@danielduan

Description

@danielduan

For a story that has a link to an external site, if the user clicks and navigates to the site, there's no way to return the preview iframe back except to refresh the page.

Story:

<a href="https://www.google.com">Click here to be banished forever!</a>
or 
<a href="/somewhere/far/far/away">Click here to get lost!</a>

Discovered this bug while playing with Lonely Planet's Storybook:
https://github.com/lonelyplanet/backpack-ui

I think we can fix it by detecting the location of the iframe when navigating to a new story and reload the entire iframe if it's in the wrong place.

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