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.
This commit is contained in:
Jiaxun Wei
2019-12-30 07:40:03 +08:00
committed by Matt Bierner
parent faa3aa6f13
commit d6245d285e
@@ -61,7 +61,7 @@ export class IFrameWebview extends BaseWebview<HTMLIFrameElement> 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%';