Hello,
We are trying to integrate Builder.io in an existing application and we are having an issue with Builder.RegisterComponent.
We registered a component that has click events. When the user click on the component action button, they are supposed to be redirected to a new page.
This work as expected in Google Chrome but Firefox (89) gives us a DomException: “this operation is insecure”.
We tried to find out what could cause the issue but haven’t had luck so far.
We tried to replicate the issue locally but then the issue doesn’t happen.
Step to reproduce:
Create a component that pushes to the history object, then register it using Builder.registerComponent:
import {withRouter} from "react-router"
import {Builder} from "@builder.io/react"
function MyLink({ history }) {
const handleClick = () => history.push("/page")
return <button onClick={handleClick}>nav</button>
}
const Link = withRouter(MyLink);
Builder.RegisterComponent(Link, {name: "link"});
Then inside Builder.io, use this component in one page or section, publish the change and try clicking on the button.
More Information:
The application is served by an express server, we already allowed *.builder.io in the CSP headers.
The issue only happens in Firefox (tested with 89) so far. On linux and Windows.
The only error we manage to retrieve is : **Error: SecurityError: The operation is insecure.
**
Thank you if you can help with this issue.