Fix Scaffold load error when fontSize pref is set
This commit is contained in:
parent
4d35cdf095
commit
a11c5987ad
1 changed files with 10 additions and 10 deletions
|
@ -98,16 +98,7 @@ var Scaffold = new function () {
|
|||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Set font size from general pref
|
||||
Zotero.setFontSize(document.getElementById('scaffold-pane'));
|
||||
|
||||
// Set font size of code editor
|
||||
var size = Zotero.Prefs.get("scaffold.fontSize");
|
||||
if (size) {
|
||||
this.setFontSize(size);
|
||||
}
|
||||
|
||||
|
||||
this.generateTranslatorID();
|
||||
|
||||
// Add List fields help menu entries for all other item types
|
||||
|
@ -146,6 +137,15 @@ var Scaffold = new function () {
|
|||
this.initCodeEditor();
|
||||
this.initTestsEditor();
|
||||
|
||||
// Set font size from general pref
|
||||
Zotero.setFontSize(document.getElementById('scaffold-pane'));
|
||||
|
||||
// Set font size of code editor
|
||||
var size = Zotero.Prefs.get("scaffold.fontSize");
|
||||
if (size) {
|
||||
this.setFontSize(size);
|
||||
}
|
||||
|
||||
// Listen for Scaffold coming to the foreground and reload translators
|
||||
window.addEventListener('activate', () => this.reloadTranslators());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue