Form builder: renaming a field swallows the next click in its row (id-keyed each-block remounts the row on blur) #84
Labels
No labels
bug
discussion
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
edufeed/edufeed-app#84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
In the form builder (
/forms/new): rename a field, then click anything in that row — the option input, the Required checkbox, a chip's × — and the first click is silently swallowed. Typed text after clicking the option input goes nowhere (document.activeElementisBODY); a second identical click works.Found and measured by TestOER while verifying PR #80 in real Chrome (their probe's positive control failed, not its subject), at human timing — click, wait 600 ms, type at 40 ms/key — so this is not an automation-speed artifact.
activeElementis BODY, every keystroke lost, no chipMechanism (measured, then read — cites verified at
dev=65a16f1b)onchange(which fires on blur) regeneratesfield.idwhen!existing—src/lib/components/forms/FormBuilderFieldRow.svelte:289-294.FormBuilder.sveltekeys its each-block on(field.id + '-' + i)—src/lib/components/forms/FormBuilder.svelte:514.Scope and attribution
dev— reproduced byte-for-byte at the dev baseline (also at2e5237f9on the PR #80 branch with identical numbers), so it is independent of the current form-builder PR stack. It does not block #80.!existingguard this should affect/forms/newonly, not editing a published form — that part is a code read; the edit route was not driven.Repro probes
TestOER wrote two failing real-Chrome probes (
option-remount.test.js,option-remount-clicks.test.js, drop-in fore2e/— each with an in-run no-rename positive control). They are deliberately NOT on any branch since they fail by design; they will ride the fix PR as its red-first tests.Fix direction (not started)
The row identity should not change on rename: either key the each-block on a stable per-row identity (not the regenerated
field.id), or stop regeneratingfield.idon blur (generate once on creation, or only until first blur). Needs a decision on whetherfield.idstability after publish matters to anything downstream (it becomes the question id in responses).Discussion: Buzz #edufeed-app, EKKW thread, TestOER's report of 2026-08-03 20:04Z.