microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164k stars 29.2k forks source link

Unable to click download button in a webview #108602

Closed pi-r-p closed 4 years ago

pi-r-p commented 4 years ago

Steps to Reproduce:

  1. In an extension, create a webview which uses FileSaver js library , to save something in a file from a "save" button within the webview
  2. Make sure you load the webview with { enableScripts: true, retainContextWhenHidden: true, enableCommandUris:true }
  3. try the extension. In VSCode before 1.48, there was no problem

The extension where I discovered the problem is senx.warpscript-language , in the WarpScript image webview.

Does this issue occur when all extensions are disabled?: No

It seems Chrome engine added another layer to sandbox default security in the meantime, now allow-downloads is necessary within the iframe sandbox settings. PR coming soon.

pi-r-p commented 4 years ago

PS: Reverting VSCode back to 1.47 make the same extension working great. That's what I did during a few weeks before digging into the problem.