Twitch stream and chat embed hijacking parent navigation

Over the past week, I’ve been noticing some strange behavior on pages that embed both the Twitch live stream and chat. When embedded on a page once both the iframes have finished loading, a new entry is added to the browser history, requiring the user to navigate back twice instead of once to get to a page that landed them on a page with these 2 embeds. I’ve noticed this issue my personal projects but also in a number of web apps that embed twitch streams and chat.

I’ve prepared a pretty simple codesandbox with react and react-router demonstrating the issue:

Something to note is that the issue is only reproducible, once both the live stream embed and the chat have finished loading and does not appear reproducible if only one of the 2 frames is being rendered.

I’ve also experienced this. Here’s the github issue

In your code sandbox, I can repro the issue by removing the useEffect so only the chat iframe renders.

Hopefully we can get some eyes on this sooner than later.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.