# 点击“继续编辑”后，草稿不再自动保存

**URL:** https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367
**Category:** Bug
**Tags:** drafts
**Created:** [2025年四月24日 22:34 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367 "2025-04-24T22:34:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025年四月24日 22:34 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367/1 "2025-04-24T22:34:12Z")

</div>

今天我丢失了草稿中的很大一部分，因为在点击“关闭”然后选择“继续编辑”后，自动保存似乎不起作用。

重现步骤：

1. 创建一个草稿。它可以是回复、新主题或私人消息。我建议选择前者，这样您就不需要添加标题。
2. 写一些文本。
3. （意外地）点击“关闭”，然后选择“继续编辑”。
4. 再写一些文本。
5. 复制您写过的文本或记住您的输入。
6. 重新加载页面。
7. 打开您的草稿。
8. 在点击“继续编辑”后写的所有内容都丢失了。

  
视频以双倍速度播放，因此尽管在输入文本后需要等待一段时间以确保自动保存有机会保存输入，但视频不会太长。您可以看到粘贴一些文本并重新加载可以正常工作。然后，在点击“关闭”和“继续编辑”后，输入未保存并在重新加载期间消失。但是，在不使用“继续编辑”的情况下粘贴相同的文本最终可以正常工作。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2025年四月28日 06:34 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367/2 "2025-04-28T06:34:27Z")

</div>

好的，我已经将此问题标记为中优先级别，将在未来四周内有人跟进处理。  
同意，这远非理想情况。

---

<div class="post-metadata">

### Author: ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)
#### Post date: [2025年五月26日 14:05 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367/6 "2025-05-26T14:05:27Z")

</div>

此问题应已通过此提交修复：

> <https://github.com/discourse/discourse/commit/804bdcfe5fba814dca4d5d267d28232f1a7578e9>
>
> 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.

---

<div class="post-metadata">

### Author: ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)
#### Post date: [2025年五月29日 14:06 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367/7 "2025-05-29T14:06:07Z")

</div>

此话题在 3 天后被自动关闭。已禁止回复。
