Skip to content

Commit 4cd196c

Browse files
committed
fix_radio_bug
1 parent 0b169e0 commit 4cd196c

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

ForInstalledPython/glow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GlowScriptOffline/glowscript_libraries/glow.3.2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/glow/primitives.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,17 +2803,14 @@
28032803
},
28042804
get checked() {return attrs.checked},
28052805
set checked(value) {
2806-
//if (value == attrs.checked) return // no need to process
28072806
if (attrs.name !== null) {
2808-
let rb = __radio_buttons
28092807
let name = attrs.name
2808+
let rb = __radio_buttons
28102809
if (value) {
2811-
if (name in rb) {
2812-
rb[name].checked = false
2813-
rb[name] = cradio
2814-
} else {
2815-
rb[name] = value ? cradio : null
2816-
}
2810+
if (rb[name] !== null) {
2811+
rb[name].checked = false
2812+
}
2813+
rb[name] = cradio
28172814
} else {
28182815
if (rb[name] !== null && rb[name]._id == attrs._id) rb[name] = null
28192816
}

0 commit comments

Comments
 (0)