diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js
index e755912c2b..b969bf2268 100644
--- a/chrome/content/zotero/preferences/preferences_sync.js
+++ b/chrome/content/zotero/preferences/preferences_sync.js
@@ -81,7 +81,7 @@ Zotero_Preferences.Sync = {
},
- credentialsKeyPress: function (event) {
+ credentialsChange: function (event) {
var username = document.getElementById('sync-username-textbox');
var password = document.getElementById('sync-password');
@@ -95,9 +95,12 @@ Zotero_Preferences.Sync = {
syncAuthButton.setAttribute('disabled', 'false');
}
});
-
+ },
+
+
+ credentialsKeyPress: function (event) {
if (event.keyCode == 13) {
- Zotero_Preferences.Sync.linkAccount(event);
+ this.linkAccount(event);
event.preventDefault();
}
},
diff --git a/chrome/content/zotero/preferences/preferences_sync.xul b/chrome/content/zotero/preferences/preferences_sync.xul
index 4a098a78dc..eef4e6a12c 100644
--- a/chrome/content/zotero/preferences/preferences_sync.xul
+++ b/chrome/content/zotero/preferences/preferences_sync.xul
@@ -68,12 +68,16 @@
+ oninput="Zotero_Preferences.Sync.credentialsChange(event)"
+ onchange="Zotero_Preferences.Sync.credentialsChange(event)"
+ onkeypress="Zotero_Preferences.Sync.credentialsKeyPress(event)"/>
+ oninput="Zotero_Preferences.Sync.credentialsChange(event)"
+ onchange="Zotero_Preferences.Sync.credentialsChange(event)"
+ onkeypress="Zotero_Preferences.Sync.credentialsKeyPress(event)"/>