From d6245d285e11afc7e63eebcfbf99f3cf00804c31 Mon Sep 17 00:00:00 2001 From: Jiaxun Wei Date: Mon, 30 Dec 2019 07:40:03 +0800 Subject: [PATCH] fix: add 'allow-forms' to sandbox attribute. (#87334) Extensions like "mtxr.sqltools" using form to update configuration, this patch will help them to work with the VS Online Web Edition. --- src/vs/workbench/contrib/webview/browser/webviewElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index ab0760b511f..03133778a0b 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -61,7 +61,7 @@ export class IFrameWebview extends BaseWebview implements Web protected createElement(options: WebviewOptions) { const element = document.createElement('iframe'); element.className = `webview ${options.customClasses || ''}`; - element.sandbox.add('allow-scripts', 'allow-same-origin'); + element.sandbox.add('allow-scripts', 'allow-same-origin', 'allow-forms'); element.setAttribute('src', `${this.externalEndpoint}/index.html?id=${this.id}`); element.style.border = 'none'; element.style.width = '100%';