# 草稿在取消回复后不再自动保存

**URL:** https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370
**Category:** Bug
**Tags:** fixed, drafts
**Created:** [2025年十月21日 20:41 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370 "2025-10-21T20:41:32Z")
**Posts on this page:** 7
**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年十月21日 20:41 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/1 "2025-10-21T20:41:32Z")

</div>

这与 [Draft is no longer automatically saved after you click 'keep editing'](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-click-keep-editing/363367) 非常相似

今天我又丢失了一部分草稿，而且模式非常相似。在你点击 `回复` 然后点击 `取消` （当你查看一个与你回复的主题不同的主题时）之后，自动保存似乎不起作用。

重现步骤：

1. 开始回复一个主题的草稿
2. 写一些文字。
3. 导航到另一个主题，同时保持草稿打开
4. 点击 `回复` 并选择 `取消` 在询问你想回复哪个主题的模态框中。
5. 再写一些文字。
6. 复制你写下的文字或记住你的输入。
7. 重新加载页面/关闭编辑器。
8. 导航回你回复的主题
9. 打开你的草稿。
10. 点击 `取消` 后写的所有内容都丢失了。

在视频中，你可以看到粘贴一些文字并重新加载可以正常工作。然后，在导航到另一个主题后，点击 `回复` 和 `取消` ，输入没有保存并在重新加载时消失。但是，在模态框中不使用 `取消` 的情况下执行相同的操作最终可以正常工作。

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [2025年十月22日 00:26 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/2 "2025-10-22T00:26:19Z")

</div>

我目前还无法重现此问题……本周晚些时候我会再试一次。

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2025年十月22日 01:40 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/3 "2025-10-22T01:40:22Z")

</div>

谢谢 Moin，我刚刚重现了这个问题。将着手修复。

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2025年十月22日 04:43 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/4 "2025-10-22T04:43:32Z")

</div>

好的，这现在已经合并：

> <https://github.com/discourse/discourse/pull/35534>
>
> Steps to reproduce:
> 
> \* Start drafting a reply to a topic
> \* Write some text.
> …\* Navigate to a different topic while keeping the draft open
> \* Click reply on the composer and choose cancel in the modal asking which topic you want to reply to.
> \* Write some more text.
> \* Copy the text you have written or memorize your input.
> \* Reload the page/ close the composer.
> \* Navigate back to the topic you replied to
> \* Open your draft.
> \* Everything written after clicking cancel is missing.
> 
> The modal in question:
> 
> \<img width="501" height="314" alt="image" src="https://github.com/user-attachments/assets/e3f3d3f3-0cb9-421f-90cc-607e34ccf2b3" /\>
> 
> This was happening because we weren't doing anything on Cancel for
> the topic reply choice dialog, and we were doing \`disableDrafts\` before
> opening the dialog, so drafts never resumed.
> 
> The fix is to just save the current draft on cancel then turn on
> draft saving again so the user can continue typing and delay the
> question about "Which topic do you want to reply to?" until later.
> 
> c.f. https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370
> 
> Also rename TopicLabelContent to TopicReplyChoiceDialog, it
> is more specific and reflects what the component actually does.

我们会在打开该对话框时暂停草稿保存，然后在关闭时从不恢复。

---

<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年十月22日 05:46 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/5 "2025-10-22T05:46:40Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2026年三月24日 18:37 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/6 "2026-03-24T18:37:35Z")

</div>



---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026年三月25日 13:49 UTC](https://meta.discourse.org/t/draft-is-no-longer-automatically-saved-after-you-cancel-replying/386370/7 "2026-03-25T13:49:52Z")

</div>


