Preferences: Fire synctopreference *after* updating preference (#4615)
And add a new beforesynctopreference event to replace the old behavior. You almost always want the preference to be updated before acting on the change.
This commit is contained in:
parent
9978fa73e1
commit
5e71fdf1cc
1 changed files with 2 additions and 1 deletions
|
@ -430,8 +430,9 @@ ${str}
|
|||
else {
|
||||
value = elem.value;
|
||||
}
|
||||
elem.dispatchEvent(new Event('synctopreference'));
|
||||
elem.dispatchEvent(new Event('beforesynctopreference'));
|
||||
Zotero.Prefs.set(preference, value, true);
|
||||
elem.dispatchEvent(new Event('synctopreference'));
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue