Skip to content

Commit a67ae5f

Browse files
committed
Fixing wrong behavior of "Control mode" field on config form: part II.
1 parent b5419e1 commit a67ae5f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

js/config.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,18 @@ $(document).ready(function() {
8282
var $checked = $(this).find('.external-modules-input-element:checked');
8383

8484
if ($checked.length === 0) {
85-
$checked = $(this).find('.external-modules-input-element[value="default"]');
85+
$(this).find('.external-modules-input-element').each(function() {
86+
// This is a workaround for an EM bug that does not load
87+
// radios default values properly.
88+
if (typeof this.attributes.checked !== 'undefined') {
89+
$checked = $(this);
90+
return false;
91+
}
92+
});
93+
94+
if ($checked.length === 0) {
95+
$checked = $(this).find('.external-modules-input-element[value="default"]');
96+
}
8697
}
8798

8899
branchingLogicRadios($checked);

0 commit comments

Comments
 (0)