Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.252 -r1.284.2.253 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Jun 2024 09:35:54 -0000 1.284.2.252 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Jun 2024 10:47:34 -0000 1.284.2.253 @@ -4252,12 +4252,12 @@ const repeatSelector = `[id^='${containerId}']`; const compoundRepeatSelector = `[data-repeat-template-id='${id}']` const targetNode = document.getElementById(containerId); - const config = { childList: true }; + const config = { childList: true, subtree: true }; const callback = (mutationList, observer) => { for (const mutation of mutationList) { for (const repeatedField of mutation.addedNodes) { - const inputField = repeatedField.querySelector(compoundRepeatSelector) || - repeatedField.querySelector(repeatSelector); + const inputField = repeatedField.querySelector?.(compoundRepeatSelector) || + repeatedField.querySelector?.(repeatSelector); if (!inputField) { continue; } const fieldId = inputField.id; const repeatInfo = JSON.parse(repeatedField.getAttribute('data-repeat'));