Skip to content

fix(viewer): save edits before the viewer downloads the file - #9349

Draft
skjnldsv wants to merge 1 commit into
mainfrom
fix/save-before-download
Draft

skjnldsv wants to merge 1 commit into
mainfrom
fix/save-before-download

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 8, 2026

Copy link
Copy Markdown
Member

Text#9235 dropped the downloadCallback Text gave the old viewer, so a download from the viewer on 36 misses unsaved edits. The viewer now dispatches before-download on the handler's element (nextcloud-libraries/nextcloud-viewer#129), and the wrapper hands it the editor's saveWhenDirty().

Draft until that is released and Text bumps to it. Covered by a unit test that mounts the wrapper as a custom element; not tried in a browser yet.

馃懢 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

The viewer app called the handler's downloadCallback before a download,
which Text used to save edits not written yet. The viewer of Nextcloud 36
dispatches `before-download` on the handler's element instead: the wrapper
hands it the editor's saveWhenDirty(), so the download waits for the save
and gets the edits too.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvo忙 <14975046+skjnldsv@users.noreply.github.com>

This branch has not been deployed

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

Labels

2. developing bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant