From 737b8ecc83669308638258b925e29547784a19f1 Mon Sep 17 00:00:00 2001 From: Jesse Gumm Date: Sun, 31 Dec 2023 12:08:03 -0600 Subject: [PATCH] Roll back the checked check in set_value --- priv/www/nitrogen.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/priv/www/nitrogen.js b/priv/www/nitrogen.js index d854ade6..3f5a0c0f 100644 --- a/priv/www/nitrogen.js +++ b/priv/www/nitrogen.js @@ -1085,8 +1085,9 @@ NitrogenClass.prototype.$set_value = function(anchor, element, value, optional_l var n = this; if (!element.id) element = objs(element); element.each(function(index, el) { - if (el.checked != undefined) el.checked = value; - else if (el.value != undefined) $(el).val(value); + if (el.value != undefined) $(el).val(value); + // use checked if el.type=="checkbox" + else if (el.checked != undefined) el.checked = value; else if (el.src != undefined) el.src = value; else if($(el).hasClass("ui-progressbar")) n.$set_progress_bar_value(el, value, optional_label); else if($(el).hasClass("wf_mermaid")) { n.$mermaid(el, value) }