New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat embed breaks Back button #129
Comments
There's a history.push in the embed that might cause the issue. https://static.twitchcdn.net/assets/pages.embed-chat-b5a0efdcd9e88ffd5fe5.js function g(e, n, t, i) { var r = i || v(n) , o = ""; r && (o = "?" + m + "=" + function(e) { switch (e) { case d.a.VIEWS: return a.Popular; case d.a.TIME: return a.Newest; default: return e } }(r)); var s = t ? t.toLowerCase() : function(e) { var n = b(e); return n ? n.toLowerCase() : "all" }(n); c.p.history.push(e + "/" + s + o) } |
I noticed a similar issue (although, was only able to reproduce it when embedding chat in addition to a player embed on the same page). I posted on the forums about it yesterday ( https://discuss.dev.twitch.tv/t/twitch-stream-and-chat-embed-hijacking-parent-navigation/26059 ), though I might add a +1 here |
This might be fixed. I haven't been able to reproduce the issue for almost 3 weeks. |
@kaldune - We believe we addressed this, but if you continue to see this happening, please feel free to reopen. |
Brief description
After the chat embed loads, it inappropriately adds the current page to the browser history. This usually breaks the Back button but not always. Sometimes the browser detects the duplicate history and navigates back correctly. When the Back button breaks, the experience is terrible.
How to reproduce
Open Chrome, Edge or Firefox
Navigate to one of the following and wait for chat to fully load:
https://www.twitch.tv/embed/rifftrax/chat
https://codesandbox.io/s/dazzling-gates-y7wnt
Hit the refresh button and wait for the chat to load again. Repeat this a few times. The chat embed keeps pushing the current page into the browser history.
Expected behavior
Chat embed should not alter browser history.
Screenshots
Additional context or questions
N/A
The text was updated successfully, but these errors were encountered: