- πΊπΈUnited States DamienMcKenna NH, USA
Patch #36 (based on #32) resolves the problem of where the form is positioned, but the focus is still moved to the wrong field, the focus is moved to the first field in the parent entity form, rather than the first item of the child paragraph being added.
In my scenario I'm using Layout Builder to control the fields on an inline block. The block has two text fields followed by a paragraphs field. When either click "Edit" to show the fields for the paragraph, or click the "add" button to add another paragraph item, the same thing happens - the focus moves to the first field of the block, not the first field of the paragraph.
Is it possible there are core issues complicating this, something with the AJAX logic?
- πΊπΈUnited States DamienMcKenna NH, USA
Possibly related: β¨ Add ['#ajax']['refocus'] property to FormAPI elements Active
- πΊπΈUnited States DamienMcKenna NH, USA
fwiw this appears to describe the issue I'm facing, but the provided patch doesn't fix it: π Ajax replace inside a modal causes the current field to lose focus. Needs work
- π«π·France MaxPah
Hello,
Here a quick fix to get focus on the last element added.