OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 5 forks source link

Query widget appearing when clicking add repeat group button in form #20

Open eprager412 opened 10 months ago

eprager412 commented 10 months ago

Describe the bug Query widget appearing when clicking add repeat group button in form

To Reproduce Steps to reproduce:

1: Open for in mode single/fs/c/i newrepeatgroup.txt 2: Click "[ + ]" button to add a new repeating group in the form

Expected: New repeating group is added to form

Actual: New repeating group is added, but Query widget appears as well

Note: Issue also appears in preview of form

image

theywa commented 10 months ago

Hi @MartijnR, I found that this issue happens because all the children of the repeated element are readonly that is why the query selector picks the input dom from the query widget and scrolls into it. For the fix, I have overwritten the method from form.js in enketo-core and put a condition to check if the target dom is repeated/clone dom and exclude the query widget dom from the selector. If you have spare time please review the OpenClinica/enketo-express-oc#738, Thanks