Moin
Fevereiro 9, 2026, 9:34pm
1
Quando a criação simplificada de categoria está desabilitada, é muito difícil inserir um endereço de e-mail de entrada para uma categoria porque o campo perde o foco após cada letra que você digita.
6 curtidas
Isso deve resolver o problema
main ← fix/legacy-category-email-settings-focus-loss
opened 12:14PM - 10 Feb 26 UTC
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
2 curtidas