disable file > close for library if 1+ tabs open (#3210)
When there are multiple tabs opened, menuitem File > Close is disabled for the library tab. Fixes: #3198
This commit is contained in:
parent
e37eaac8d1
commit
9599d1712c
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ var Zotero_Tabs = new function () {
|
|||
selected: tab.id == this._selectedID,
|
||||
iconBackgroundImage: tab.iconBackgroundImage
|
||||
})));
|
||||
// Disable File > Close menuitem if multiple tabs are open
|
||||
const multipleTabsOpen = this._tabs.length > 1;
|
||||
document.getElementById('cmd_close').setAttribute('disabled', multipleTabsOpen);
|
||||
var { tab } = this._getTab(this._selectedID);
|
||||
document.title = (tab.title.length ? tab.title + ' - ' : '') + Zotero.appName;
|
||||
this._updateTabBar();
|
||||
|
|
Loading…
Add table
Reference in a new issue