From 748bdfd59d589bd32d7a9c83f054ba47ac9e5f4f Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Mon, 8 Jun 2026 13:32:44 +0100 Subject: [PATCH] Merge pull request #34395 from overleaf/mj-tabs-disable-close-button [web] Disable close tab button on last tab GitOrigin-RevId: 2d4600162696b07848311e75154d9d86aac0b315 --- .../features/source-editor/components/tabs/tab.tsx | 3 +++ .../components/tabs/tabs-container.tsx | 1 + .../web/frontend/stylesheets/pages/editor/tabs.scss | 13 +++++++++++++ .../features/source-editor/components/tabs.spec.tsx | 12 ++---------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/components/tabs/tab.tsx b/services/web/frontend/js/features/source-editor/components/tabs/tab.tsx index 3c0b10c162..f207d19b2b 100644 --- a/services/web/frontend/js/features/source-editor/components/tabs/tab.tsx +++ b/services/web/frontend/js/features/source-editor/components/tabs/tab.tsx @@ -26,6 +26,7 @@ type TabProps = { tab: EditorFileTab openTab: (id: string) => void closeTab: (id: string) => void + canCloseTab: boolean makeTabPermanent: (id: string) => void openContextMenu: ( coords: { top: number; left: number }, @@ -56,6 +57,7 @@ export const Tab = memo(function Tab({ tab, openTab, closeTab, + canCloseTab, makeTabPermanent, openContextMenu, closeContextMenu, @@ -233,6 +235,7 @@ export const Tab = memo(function Tab({