Skip to content

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

Merged
mejo- merged 1 commit into
mainfrom
fix/save-before-download
Oct 14, 2026
Merged

mejo- merged 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#130), 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>
@mejo-
mejo- force-pushed the fix/save-before-download branch from 5febc7f to ad71bb8 Compare October 14, 2026 11:01
@mejo-
mejo- marked this pull request as ready for review October 14, 2026 11:01
@mejo- mejo- self-assigned this Oct 14, 2026
@mejo-
mejo- merged commit 8cd4044 into main Oct 14, 2026
65 of 69 checks passed
@mejo-
mejo- deleted the fix/save-before-download branch October 14, 2026 12:59
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.

2 participants