You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insiderssimple-file-dialogIssues with simple file dialogverifiedVerification succeeded
Note 1: A dialog can select files, folders, or both. This is not true for Windows which enforces to open either files or folder, but not both.
But as I've discovered, this limitation also applies to Linux - not just Windows. Additionally, it's not clear what actually happens when specifying both canSelectFiles: true and canSelectFolders: true. Since VS Code uses the Electron API under the hood, I checked their docs about dialog, and found a much clearer note:
Note: On Windows and Linux an open dialog can not be both a file selector and a directory selector, so if you set properties to ['openFile', 'openDirectory'] on these platforms, a directory selector will be shown.
This allowed me to understand the cause of the issue I fixed in microsoft/vscode-java-dependency#434. I think it would be much clearer if the note said something like:
Note 1: On Windows and Linux a dialog cannot be both a file selector and a folder selector, so if you set both canSelectFiles and canSelectFolders to true on these platforms, a folder selector will be shown.
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insiderssimple-file-dialogIssues with simple file dialogverifiedVerification succeeded
Activity
gregvanl commentedon Jan 5, 2021
Hi Odin Dahlström (@0dinD), thank you for suggested clarification. The vscode-api topic is autogenerated from https://github.com/microsoft/vscode/blob/master/src/vs/vscode.d.ts so moving this suggestion to the vscode repo.
Feel free to submit a PR with your updated note.
Clarify OpenDialogOptions note (microsoft#113831)
Clarify OpenDialogOptions note (#113831) (#113998)