-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Capture File->Save menu option when using a webview #60801
Comments
(Experimental duplicate detection) |
@sbatten With your work, won't the save menu item be disabled if there is no active editor? |
Closed by mistake |
@mjbvz yes, we should add that context key to save and save as... |
@sbatten sorry but I had to revert this change as it imho breaks our layers. Checking https://github.com/Microsoft/vscode/wiki/Code-Organization#workbench-parts there is:
In this case we suddenly make the files contribution depend on the welcome experience. Is that really a good idea? I would prefer a clean solution where e.g. we introduce a new context key that is managed by the workbench and is updated when editors change by asking them if they can be saved or not. This may not exist yet, but we can easily add more methods to editors (or inputs) to support that. |
fair enough. I would argue that this isn't a hard dependency in that the removal of the welcome ex does not change its behavior, but I understand the idea. I don't want to be maintaining this list if it grows, either. I did not find a reliable dirtyEditor context key or similar, but we can add one. |
How is this not a hard dependency? We will not be able to bundle the file explorer alone without the welcome code unless we remove the import statements.
I think |
My mistake, forgot I actually used the id variable and not just the string literal. |
We have a use case where we have created our own extension to open certain file extensions via a webview. This basically allows the user to enter meta data stored in json in a more visual way. One issue we are running into though is since we are using a webview, if the user selects File->Save or any of those save commands, we aren't able to capture that.
We need an event to get fired if the user does that and a WebView is the current active editor.
The text was updated successfully, but these errors were encountered: