Skip to content

fix(vscode-ext): prevent autosave from opening a Save File dialog on every edit#3781

Open
claudiusararu wants to merge 1 commit into
superdoc-dev:mainfrom
claudiusararu:fix/vscode-ext-autosave-dialog
Open

fix(vscode-ext): prevent autosave from opening a Save File dialog on every edit#3781
claudiusararu wants to merge 1 commit into
superdoc-dev:mainfrom
claudiusararu:fix/vscode-ext-autosave-dialog

Conversation

@claudiusararu

Copy link
Copy Markdown

Problem

Fixes #3768. Editing any .docx in the SuperDoc VS Code extension pops a browser "Save File" dialog on essentially every edit (the ~1s debounced autosave and Cmd/Ctrl+S both trigger it), which makes real editing unusable.

Root cause

The webview autosave calls editor.export({ format: 'docx' }). SuperDoc's export() defaults triggerDownload: true, and for a single docx blob that path calls createDownload(...)window.showSaveFilePicker, opening the dialog. (format is also not a recognized export() option — the correct key is exportType.)

Fix

Pass triggerDownload: false (and the correct exportType: ['docx']) so export() returns the Blob directly — exactly what the blob.arrayBuffer()postMessage save path consumes. No dialog; silent autosave-to-disk keeps working.

// apps/vscode-ext/webview/main.js
- const blob = await editor.export({ format: 'docx' });
+ const blob = await editor.export({ exportType: ['docx'], triggerDownload: false });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension: autosave fires a "Save File" dialog on every edit (export() called without triggerDownload: false)

1 participant