Preferences: Dispatch synctopreference *before* setting preference

Matches pre-fx102 behavior.
This commit is contained in:
Abe Jellinek 2024-02-29 10:44:05 -08:00
parent ae441c6db1
commit 19b12b613b

View file

@ -400,8 +400,8 @@ ${str}
_syncToPrefOnModify(event) {
if (event.currentTarget.getAttribute('preference')) {
let value = this._useChecked(event.currentTarget) ? event.currentTarget.checked : event.currentTarget.value;
Zotero.Prefs.set(event.currentTarget.getAttribute('preference'), value, true);
event.currentTarget.dispatchEvent(new Event('synctopreference'));
Zotero.Prefs.set(event.currentTarget.getAttribute('preference'), value, true);
}
},