# 使用退格键在输入自定义提示时关闭模态框

**URL:** https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699
**Category:** Bug
**Tags:** ai, ai-helper
**Created:** [2024年三月3日 13:36 UTC](https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699 "2024-03-03T13:36:16Z")
**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: [2024年三月3日 13:36 UTC](https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699/1 "2024-03-03T13:36:16Z")

</div>

在使用撰写帖子时的人工智能助手时，输入的任何拼写错误都无法使用退格键进行更正，因为它会关闭模态窗口。相反，当在其他用户的帖子上使用人工智能助手时，退格键可以正常工作。

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [2024年三月4日 20:03 UTC](https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699/3 "2024-03-04T20:03:29Z")

</div>

是的，我能重现。Backspace 在 composer AI 助手中的自定义提示中不起作用，但在 post AI 助手中可以。感谢您的报告，我会查看并在问题解决后发布更新。

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [2024年三月4日 23:08 UTC](https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699/4 "2024-03-04T23:08:10Z")

</div>

🎉 此问题现已解决，解决时间为：

> <https://github.com/discourse/discourse-ai/pull/505>
>
> This PR fixes a bug that was introduced in https://github.com/discourse/discours…e-ai/pull/374 because it was not checking if the menu state was in trigger mode.

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [2024年三月5日 23:08 UTC](https://meta.discourse.org/t/using-backspace-key-while-typing-custom-prompt-closes-modal/297699/5 "2024-03-05T23:08:52Z")

</div>

此主题在上次回复后 24 小时自动关闭。不再允许回复。
