Issue with repeaters
-
A new issue has occured with te pods repeater. I can confirm it works up until version 3.3.4 and after hat it doesn’t work
Basically when I start typing on a repeater field, the focus immediately lifts so i only get one character in at time. I could probably copy and paste but I downgraded to 3.3.4 for now.
Steps to Reproduce:
- Create any Pod with a Paragraph field set to repeatable: yes, format: plain text
- Create or edit a post using that Pod
- Click into the repeatable textarea and start typing
- After a few characters, the cursor disappears and focus is lost Expected: Textarea keeps focus while typing, like any normal input. Actual: Focus jumps to mid-keystroke. You must click back into the textarea to continue.
I did some investigation with Claude Code thinking I did something wrong and here’s what came up (and i wasn’t me)
Claude QuoteRoot Cause (investigated via MutationObserver):
The Pods DFV system is doing a full DOM replacement of the repeater row while you type. Specifically, the
.pods-field-wrapper__repeatable-field-table container:- Removes the child DIV.pods-field-wrapper__item (the entire repeater row containing the textarea you’re typing in)
- Inserts a brand new DIV.pods-field-wrapper__item with a fresh textarea Because the original textarea DOM node is destroyed, the browser has nothing to hold focus on, so document.activeElement
falls back to . This was confirmed by tagging textarea elements with a JavaScript property marker — after the focus loss, the original
marked element is gone and a new unmarked textarea exists in its place. A MutationObserver on the parent container
caught exactly 2 mutations: one removedNodes and one addedNodes, both targeting .pods-field-wrapper__item. Regression:
- 3.3.4: Works correctly — no DOM replacement, focus is retained
- 3.3.5: Broken — DOM replacement occurs on every value change
End of Claude Quote
Is this a known bug? PS There is also another bug that popped up earlier on the where clause and I can put that one in a separate post.
You must be logged in to reply to this topic.