From b7e7174f3d6261cf9b9fa9b39f15d1fd91ad5cdb Mon Sep 17 00:00:00 2001 From: Tristan Zhang <82869104+ABucket@users.noreply.github.com> Date: Thu, 2 Oct 2025 20:56:53 +0800 Subject: [PATCH] feat: add middle-click tab closing (#10498) --- src/renderer/src/components/Tab/TabContainer.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/Tab/TabContainer.tsx b/src/renderer/src/components/Tab/TabContainer.tsx index 3930819c6e..a83621f4b0 100644 --- a/src/renderer/src/components/Tab/TabContainer.tsx +++ b/src/renderer/src/components/Tab/TabContainer.tsx @@ -237,7 +237,17 @@ const TabsContainer: React.FC = ({ children }) => { onSortEnd={onSortEnd} className="tabs-sortable" renderItem={(tab) => ( - handleTabClick(tab)}> + handleTabClick(tab)} + onAuxClick={(e) => { + if (e.button === 1 && tab.id !== 'home') { + e.preventDefault() + e.stopPropagation() + closeTab(tab.id) + } + }}> {tab.id && {getTabIcon(tab.id, minapps, minAppsCache)}} {getTabTitle(tab.id)}