From 201d73ac9422b8ab40ab9d1dd06edfc279451609 Mon Sep 17 00:00:00 2001 From: "mgalli%geckonnection.com" Date: Mon, 31 Oct 2005 21:12:05 +0000 Subject: [PATCH] Workaround to check the checkbox.checked and set the right checkbox.value. Bug 314538 git-svn-id: svn://10.0.0.236/trunk@183288 18797224-902f-48f8-a5cc-f745e15eee43 --- .../minimo/chrome/content/preferences/preferences.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/minimo/chrome/content/preferences/preferences.js b/mozilla/minimo/chrome/content/preferences/preferences.js index 9234f3824e5..5b42b8e9570 100644 --- a/mozilla/minimo/chrome/content/preferences/preferences.js +++ b/mozilla/minimo/chrome/content/preferences/preferences.js @@ -231,9 +231,17 @@ function PrefOkay() { var prefSETValue=null; if(transValidator!="") { prefSETValue=eval(transValidator); - - } else { + + // Checkbox is always true so far. XUL spec says it should flip value property based on checkbox state. + // The following conditional chunk may be considered workaround code - bug 314538 + if(elRef.nodeName=="checkbox") { + if(elRef.checked) { + elRef.value=true; + } else { + elRef.value=false; + } + } prefSETValue=elRef.value; } if (gPref.getPrefType(prefName) == gPref.PREF_STRING){