score:3

React treats <iframe sandbox /> just like it was <iframe sandbox={true} /> which is not correct here.

Based on the docs here: https://www.w3schools.com/tags/att_iframe_sandbox.asp, browser expects sandbox prop to be an empty value.

You should simply use

<iframe
  frameBorder="0"
  ref={(container) => { this.container[index] = container; }}
  srcDoc={thread.body}
  sandbox=""
/>

EDIT:

As OP answered in the comments, he had to do sandbox="allow-same-origin allow-popups".


Related Query

More Query from same tag