fix: template editor open bug
This commit is contained in:
parent
f461abe0fb
commit
0d5f213506
|
|
@ -1283,11 +1283,7 @@ class AddonEvents extends AddonBase {
|
|||
/*
|
||||
message.content = {}
|
||||
*/
|
||||
window.open(
|
||||
"chrome://Knowledge4Zotero/content/template.xul",
|
||||
"_blank",
|
||||
"chrome,extrachrome,centerscreen,width=800,height=400,resizable=yes"
|
||||
);
|
||||
this._Addon.template.openEditor();
|
||||
} else if (message.type === "export") {
|
||||
/*
|
||||
message.content = {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,18 @@ class AddonTemplate extends AddonBase {
|
|||
];
|
||||
}
|
||||
|
||||
openEditor() {
|
||||
if (this._window && !this._window.closed) {
|
||||
this._window.focus();
|
||||
} else {
|
||||
window.open(
|
||||
"chrome://Knowledge4Zotero/content/template.xul",
|
||||
"_blank",
|
||||
"chrome,extrachrome,centerscreen,width=800,height=400,resizable=yes"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
initTemplates(_window: Window) {
|
||||
this._window = _window;
|
||||
this.updateTemplateView();
|
||||
|
|
|
|||
Loading…
Reference in New Issue