theia icon indicating copy to clipboard operation
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

Open safisa opened this issue 2 years ago • 1 comments

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:

  1. try the cat scrach example from vscode extensions (you can find it in this issue https://github.com/eclipse-theia/theia/issues/10787)
  2. open the example.cscratch file
  3. do some changes in the custom editor UI (add some cats by clicking on the scratch button)
  4. close the tab (you will see that there is no confirmation to save)
  5. open the file again, and you will see that your changes were saved.

Additional Information

  • Operating System: window 10
  • Theia Version: 1.26

safisa avatar Aug 22 '22 10:08 safisa

I see where the issue is, I will try to fix it and apply a PR.

safisa avatar Aug 22 '22 10:08 safisa

Done: https://github.com/eclipse-theia/theia/pull/11593

safisa avatar Sep 26 '22 14:09 safisa