# Close document programmatically and skip "Save your work" prompt

**URL:** <https://discourse.jupyter.org/t/close-document-programmatically-and-skip-save-your-work-prompt/20935>\
**Category:** JupyterLab\
**Created:** [August 16, 2023, 7:38pm UTC](https://discourse.jupyter.org/t/close-document-programmatically-and-skip-save-your-work-prompt/20935 "2023-08-16T19:38:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IlKa](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/ilka/32/10618_2.png) [@IlKa](https://discourse.jupyter.org/u/IlKa)\
**Post date:** [August 16, 2023, 7:38pm UTC](https://discourse.jupyter.org/t/close-document-programmatically-and-skip-save-your-work-prompt/20935/1 "2023-08-16T19:38:05Z")

</div>

Hello.

I have the following code in extension:

```auto
        documentManager.confirmClosingDocument = false;
        await documentManager.closeAll();

```

However, JupyterLab still shows an window asking me if I want to save my work. Is it a bug or do I misuse API somehow?

I could, of course, save docs excplicitly

```auto
        await app.commands.execute("docmanager:save-all");

```
