Commit 7888a8ec authored by Marc Egger's avatar Marc Egger
Browse files

Fixes #11750 checkbox produces two input html elements with the same name

This fixes the current issue but is not a nice solution.
We just loop through all input elements having the same name.
It would be better, if we would filter out hidden elements.
But this might break some other behaviour... so I chose this approach.
parent 6060d37a
Pipeline #4544 failed with stages
in 2 minutes and 14 seconds
......@@ -216,14 +216,17 @@ var QfqNS = QfqNS || {};
return null;
}
var iterator = $formControl[0];
while (iterator !== null) {
if (iterator.hasAttribute('role') &&
iterator.getAttribute('role') === 'tabpanel') {
return iterator.id || null;
var i;
var iterator
for (i = 0; i < $formControl.length; i++) {
iterator = $formControl[i];
while (iterator !== null) {
if (iterator.hasAttribute('role') &&
iterator.getAttribute('role') === 'tabpanel') {
return iterator.id || null;
}
iterator = iterator.parentElement;
}
iterator = iterator.parentElement;
}
return null;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment