# 类别设置中自定义收件人电子邮件地址字段在输入每个字符后都会失去焦点

**URL:** <https://meta.discourse.org/t/custom-incoming-email-address-field-in-category-setting-loses-focus-after-every-character-you-enter/395609>\
**Category:** Bug\
**Created:** [2026年二月9日 21:34 UTC](https://meta.discourse.org/t/custom-incoming-email-address-field-in-category-setting-loses-focus-after-every-character-you-enter/395609 "2026-02-09T21:34:59Z")\
**Posts on this page:** 3\
**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:** [2026年二月9日 21:34 UTC](https://meta.discourse.org/t/custom-incoming-email-address-field-in-category-setting-loses-focus-after-every-character-you-enter/395609/1 "2026-02-09T21:34:59Z")

</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年二月10日 15:35 UTC](https://meta.discourse.org/t/custom-incoming-email-address-field-in-category-setting-loses-focus-after-every-character-you-enter/395609/4 "2026-02-10T15:35:08Z")

</div>

这应该能解决问题

> <https://github.com/discourse/discourse/pull/37669>
>
> When \`enable\_simplified\_category\_creation\` is disabled, the email fields in cate…gory settings lose focus after every keystroke, making it impossible to type an email address.
> 
> The legacy category editor wraps all tabs in a FormKit \`\<Form\>\` component. The Form wrapper uses \`{{#each (array @data)}}\` which destroys and recreates the entire component tree when \`@data\` changes identity. Since the controller's \`formData\` getter returns a new object (via \`getProperties\`) every time a model property changes, any two-way binding mutation — including every keystroke in a \`\<TextField\>\` — triggers a full teardown and rebuild of all form elements, destroying the focused input.
> 
> This commit converts the email section inputs (\`email\_in\`, \`email\_in\_allow\_strangers\`, \`mailinglist\_mirror\`) from two-way model bindings to use FormKit's data layer (\`form.set\` / \`transientData\`). Edits to these fields no longer mutate the model, so \`formData\` isn't invalidated and the form is not recreated.
> 
> This commit also passes \`form\` to the \`category-email-in\` and \`category-custom-settings\` plugin outlets on the legacy page, matching what the simplified page already does, so that plugins can adopt FormKit as well.
> 
> https://meta.discourse.org/t/395609

---

<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:** [2026年二月12日 21:00 UTC](https://meta.discourse.org/t/custom-incoming-email-address-field-in-category-setting-loses-focus-after-every-character-you-enter/395609/6 "2026-02-12T21:00:38Z")

</div>

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