From a40052c8c4fa19940b4cf8e507a2c0fa78239c20 Mon Sep 17 00:00:00 2001 From: "kaie%netscape.com" Date: Wed, 29 May 2002 03:32:04 +0000 Subject: [PATCH] b=110195 Master passwords steals focus in prefs r=kaie sr=alecf git-svn-id: svn://10.0.0.236/trunk@122249 18797224-902f-48f8-a5cc-f745e15eee43 --- .../manager/pki/resources/content/pref-masterpass.js | 8 +++++--- .../manager/pki/resources/content/pref-masterpass.xul | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mozilla/security/manager/pki/resources/content/pref-masterpass.js b/mozilla/security/manager/pki/resources/content/pref-masterpass.js index a672e943b68..8655c86cd28 100644 --- a/mozilla/security/manager/pki/resources/content/pref-masterpass.js +++ b/mozilla/security/manager/pki/resources/content/pref-masterpass.js @@ -63,10 +63,10 @@ function onMasterPasswordLoad() var timeoutField = document.getElementById("passwordTimeout"); timeoutField.setAttribute("value", timeout); - changePasswordSettings(); + changePasswordSettings(false); } -function changePasswordSettings() +function changePasswordSettings(setFocus) { var askTimes = 0; var timeout = internal_token.getAskPasswordTimeout(); @@ -83,7 +83,9 @@ function changePasswordSettings() break; case "2": timeoutField.removeAttribute("disabled"); - timeoutField.focus(); + if ( setFocus ) { + timeoutField.focus(); + } timeout = timeoutField.value; var re = new RegExp("^[0-9]+$"); if (!re.test(timeout)) { diff --git a/mozilla/security/manager/pki/resources/content/pref-masterpass.xul b/mozilla/security/manager/pki/resources/content/pref-masterpass.xul index 72691b15479..0acd1975ad8 100644 --- a/mozilla/security/manager/pki/resources/content/pref-masterpass.xul +++ b/mozilla/security/manager/pki/resources/content/pref-masterpass.xul @@ -75,16 +75,16 @@ + style="margin: 0px;" oncommand="changePasswordSettings(false);"/> + style="margin: 0px;" oncommand="changePasswordSettings(false);"/> + style="margin: 0px;" oncommand="changePasswordSettings(true);"/> + oninput="changePasswordSettings(false);"/>