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);"/>