diff --git a/packages/translation/src/lang/en.json b/packages/translation/src/lang/en.json index 77d37810f..29fb9b979 100644 --- a/packages/translation/src/lang/en.json +++ b/packages/translation/src/lang/en.json @@ -1625,6 +1625,9 @@ }, "allowGeolocation": { "label": "Allow geolocation" + }, + "allowModals": { + "label": "Allow modals" } }, "error": { @@ -2033,7 +2036,6 @@ "directStream": "Direct Stream" } }, - "recentActivity": { "title": "Recent Activity", "empty": "No recent activity", diff --git a/packages/widgets/src/iframe/component.tsx b/packages/widgets/src/iframe/component.tsx index 67fa73536..74032c5f5 100644 --- a/packages/widgets/src/iframe/component.tsx +++ b/packages/widgets/src/iframe/component.tsx @@ -105,6 +105,10 @@ const getSandboxFlags = ( baseSandbox.push("allow-popups-to-escape-sandbox"); } + if (permissions.allowModals) { + baseSandbox.push("allow-modals"); + } + return baseSandbox; }; diff --git a/packages/widgets/src/iframe/index.ts b/packages/widgets/src/iframe/index.ts index 9e6cc06e1..d4313aebe 100644 --- a/packages/widgets/src/iframe/index.ts +++ b/packages/widgets/src/iframe/index.ts @@ -17,6 +17,7 @@ export const { definition, componentLoader } = createWidgetDefinition("iframe", allowMicrophone: factory.switch(), allowCamera: factory.switch(), allowGeolocation: factory.switch(), + allowModals: factory.switch(), })); }, }).withDynamicImport(() => import("./component"));