theia
theia copied to clipboard
Closing a dirty/modified custom editor based on CustomTextEditorProvider doesn't ask the user to save, it just save it on close
Bug Description:
Hi, There is an issue with custom editors based on CustomTextEditorProvider, when closing a dirty/modified one there is no confirmation popup window asking the user whether to save or cancel as in all other editors, it just saving it with no question (the auto-save is off).
Steps to Reproduce:
- try the cat scrach example from vscode extensions (you can find it in this issue https://github.com/eclipse-theia/theia/issues/10787)
- open the example.cscratch file
- do some changes in the custom editor UI (add some cats by clicking on the scratch button)
- close the tab (you will see that there is no confirmation to save)
- open the file again, and you will see that your changes were saved.
Additional Information
- Operating System: window 10
- Theia Version: 1.26
I see where the issue is, I will try to fix it and apply a PR.
Done: https://github.com/eclipse-theia/theia/pull/11593