Skip to content

FIX: resolve discard draft keep editing #32667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 26, 2025

Conversation

dbattersby
Copy link
Contributor

@dbattersby dbattersby commented May 9, 2025

Fixes a bug where clicking keep editing in the discard modal dialog would result in the composer auto save being disabled. Because of this updates to drafts after this point can easily be lost.

The issue was that the cancelComposer was not resolving the promise, and therefore not setting skipAutoSave to false in the final step.

This change also includes another fix for an issue that was revealed where the discard draft dialog would continually open again after we close it. This would happen when editing a draft while viewing a different topic. It wasn't noticed before as the keep editing button would result in the code hanging at the await this.cancelComposer(opts) stage and not opening the composer again for the new topic reply.

@dbattersby dbattersby marked this pull request as draft May 12, 2025 07:46
@dbattersby dbattersby marked this pull request as ready for review May 14, 2025 08:21
@dbattersby dbattersby requested review from jjaffeux and yuriyaran May 26, 2025 07:14
@jjaffeux
Copy link
Contributor

Great dig, thanks!

@dbattersby dbattersby merged commit 804bdcf into main May 26, 2025
16 checks passed
@dbattersby dbattersby deleted the composer-draft-keep-editing-bug branch May 26, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants