From 65b909dbce5971567ae8ffca5fcd6d2b6bbb9c15 Mon Sep 17 00:00:00 2001 From: "pete.zha%sun.com" Date: Mon, 24 Feb 2003 03:00:23 +0000 Subject: [PATCH] bug=193835 Missing focus when selected the related checkbox or radiobox in Preference window. r=kyle.yuan@sun.com sr=jaggernaut@netscape.com --- extensions/cookie/resources/content/pref-cookies.xul | 3 +++ xpfe/components/prefwindow/resources/content/pref-advanced.xul | 3 +++ .../prefwindow/resources/content/pref-mousewheel.xul | 3 +++ xpfe/components/prefwindow/resources/content/pref-offline.xul | 3 +++ 4 files changed, 12 insertions(+) diff --git a/extensions/cookie/resources/content/pref-cookies.xul b/extensions/cookie/resources/content/pref-cookies.xul index 36dc4ceae3fc..849f8681f247 100644 --- a/extensions/cookie/resources/content/pref-cookies.xul +++ b/extensions/cookie/resources/content/pref-cookies.xul @@ -96,6 +96,9 @@ (lifetimeBehavior.value != 1); if (parent.hPrefWindow.getPrefIsLocked(lifetimeDays.getAttribute("prefstring")) ) lifetimeDays.disabled = true; + + if (! lifetimeDays.disabled) + lifetimeDays.focus(); } ]]> diff --git a/xpfe/components/prefwindow/resources/content/pref-advanced.xul b/xpfe/components/prefwindow/resources/content/pref-advanced.xul index cd3612a679ed..28008023b4e5 100644 --- a/xpfe/components/prefwindow/resources/content/pref-advanced.xul +++ b/xpfe/components/prefwindow/resources/content/pref-advanced.xul @@ -46,6 +46,9 @@ var checked = document.getElementById("advancedMailFTP").checked; var field = document.getElementById("advancedMailFTPAddress"); field.disabled = !checked; + + if (! field.disabled) + field.focus(); } /* diff --git a/xpfe/components/prefwindow/resources/content/pref-mousewheel.xul b/xpfe/components/prefwindow/resources/content/pref-mousewheel.xul index bc5cdfcc1b29..aa64e6598203 100644 --- a/xpfe/components/prefwindow/resources/content/pref-mousewheel.xul +++ b/xpfe/components/prefwindow/resources/content/pref-mousewheel.xul @@ -76,6 +76,9 @@ el.setAttribute("disabled", "true"); else el.removeAttribute("disabled"); + + if (!el.disabled) + el.focus(); } ]]> diff --git a/xpfe/components/prefwindow/resources/content/pref-offline.xul b/xpfe/components/prefwindow/resources/content/pref-offline.xul index ec00290e98b2..a6e19b6d1754 100644 --- a/xpfe/components/prefwindow/resources/content/pref-offline.xul +++ b/xpfe/components/prefwindow/resources/content/pref-offline.xul @@ -53,6 +53,9 @@ aField.removeAttribute("disabled"); else aField.setAttribute("disabled", "true"); + + if (! aField.disabled) + aField.focus(); }