Fix issue where non-existing tab is selected when closing multiple tabs
This commit is contained in:
parent
b8cb093f79
commit
295874f803
1 changed files with 3 additions and 0 deletions
|
@ -208,6 +208,9 @@ var Zotero_Tabs = new function () {
|
|||
if (tab.id == this._selectedID) {
|
||||
this.select(this._prevSelectedID || (this._tabs[tabIndex + 1] || this._tabs[tabIndex - 1]).id);
|
||||
}
|
||||
if (tab.id == this._prevSelectedID) {
|
||||
this._prevSelectedID = null;
|
||||
}
|
||||
this._tabs.splice(tabIndex, 1);
|
||||
document.getElementById(tab.id).remove();
|
||||
if (tab.onClose) {
|
||||
|
|
Loading…
Add table
Reference in a new issue