diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index 9ab43f28f4..70e487d638 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -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();