fix tab switch issues
This commit is contained in:
parent
e30890711a
commit
8af3a30fa4
1 changed files with 3 additions and 7 deletions
|
@ -81,10 +81,6 @@ var ZoteroTab = new function()
|
||||||
var listener = function(event) {
|
var listener = function(event) {
|
||||||
if(event.target !== tab) return;
|
if(event.target !== tab) return;
|
||||||
window.gBrowser.tabContainer.removeEventListener("TabSelect", listener, false);
|
window.gBrowser.tabContainer.removeEventListener("TabSelect", listener, false);
|
||||||
if(!Zotero || !Zotero.initialized) {
|
|
||||||
ZoteroPane.displayStartupError(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ZoteroPane.init();
|
ZoteroPane.init();
|
||||||
ZoteroPane.makeVisible();
|
ZoteroPane.makeVisible();
|
||||||
}
|
}
|
||||||
|
@ -106,10 +102,10 @@ var ZoteroTab = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onUnload = function() {
|
this.onUnload = function() {
|
||||||
if(window.ZoteroPane === window.ZoteroPane_Tab) {
|
if(this.containerWindow.ZoteroPane === this.containerWindow.ZoteroPane_Tab) {
|
||||||
window.ZoteroPane = window.ZoteroPane_Overlay;
|
this.containerWindow.ZoteroPane = this.containerWindow.ZoteroPane_Overlay;
|
||||||
}
|
}
|
||||||
delete window.ZoteroPane_Tab;
|
delete this.containerWindow.ZoteroPane_Tab;
|
||||||
ZoteroPane.destroy();
|
ZoteroPane.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue