Allow-modals issue with Embed


I’m currently working on setting up an embedded player + embedded chat into a webpage I am creating with a few streamers.

I’ve managed to get the video-player up and running, and the chat seems to be loading as well. My only issue is the second I try to send a message in chat, it gives me an error:

You rejected the prompt to send messages in this embedded version of Twitch Chat. If this was done in error, please refresh the page.

Since there was no pop-up or notification coming up, I decided to look at the console, and noticed the following error being thrown the moment I try to send a message:
Ignored call to ‘confirm()’. The document is sandboxed, and the ‘allow-modals’ keyword is not set.

From what I understand, Wix (our website provider) embeds all iframes into an iframe sandbox without the allow-modals keyword, and I unfortunately do not have a way to add it to the sandbox as that’s generated without my involvement.

What I don’t understand though is that if I change the channel from my own (papaxilion) to a few of the people I follow, sometimes the embedded chat works, no issue. The same allow-modals keyword error is thrown, but the chat message is sent, and the rejection-message is not shown.

Is there anyone that might be able to shine a light on this?

Webpage I’m currently trying things out on:

Current code used for the chat:

iframe id=“chat_embed”
frameBorder=“0” >

If I recal correctly the modal in question only fires in channels that you are a moderator (or above) in.

You sir, are a life-saver!

Working together with a few streamers at the moment, we are moderators in eachother’s channels… I just de-modded one on my own channel and BAM! Message went through!

This does however mean I as a channel-owner will not be able to chat through this embed (nor any mod for that matter), as long as the embed is lodged into the page the way Wix does it.

Not a bug per-se then, but an annoying feature.

Thank you again! :slight_smile:

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