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
This commit is contained in:
parent
9ed1792d9e
commit
1aade0f268
|
@ -398,7 +398,6 @@ Zotero_Preferences.Sync = {
|
||||||
|
|
||||||
onStorageSettingsKeyPress: Zotero.Promise.coroutine(function* (event) {
|
onStorageSettingsKeyPress: Zotero.Promise.coroutine(function* (event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
yield this.onStorageSettingsChange();
|
|
||||||
yield this.verifyStorageServer();
|
yield this.verifyStorageServer();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
@ -480,6 +479,11 @@ Zotero_Preferences.Sync = {
|
||||||
|
|
||||||
|
|
||||||
verifyStorageServer: Zotero.Promise.coroutine(function* () {
|
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");
|
Zotero.debug("Verifying storage");
|
||||||
|
|
||||||
var verifyButton = document.getElementById("storage-verify");
|
var verifyButton = document.getElementById("storage-verify");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user