commit 1aade0f268c180c625bf8e5605850b728d55e160
parent 9ed1792d9e939660c22156b0c06cdf61aa8112f8
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 10 Feb 2018 07:26:55 -0500
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
Diffstat:
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
@@ -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");