From 1aade0f268c180c625bf8e5605850b728d55e160 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 10 Feb 2018 07:26:55 -0500 Subject: [PATCH] Fix detection of WebDAV settings changes when clicking Verify Server onchange() weirdly isn't called when clicking off the textbox to a button Fixes #1291 --- chrome/content/zotero/preferences/preferences_sync.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js index 3c7aad245..1272e7569 100644 --- a/chrome/content/zotero/preferences/preferences_sync.js +++ b/chrome/content/zotero/preferences/preferences_sync.js @@ -398,7 +398,6 @@ Zotero_Preferences.Sync = { onStorageSettingsKeyPress: Zotero.Promise.coroutine(function* (event) { if (event.keyCode == 13) { - yield this.onStorageSettingsChange(); yield this.verifyStorageServer(); } }), @@ -480,6 +479,11 @@ Zotero_Preferences.Sync = { verifyStorageServer: Zotero.Promise.coroutine(function* () { + // onchange weirdly isn't triggered when clicking straight from a field to the button, + // so we have to trigger this here (and we don't trigger it for Enter in + // onStorageSettingsKeyPress()). + yield this.onStorageSettingsChange(); + Zotero.debug("Verifying storage"); var verifyButton = document.getElementById("storage-verify");