From 4c5de25f95a917a8a37216b949a6dc6af528658c Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sat, 9 May 2026 11:56:09 +0800 Subject: [PATCH] fix: enable tab context menu (close all/close others/close right) --- src/App.vue | 7 ++++--- src/components/layout/AppTabBar.vue | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index ce1c49e93d..8c4fe193c2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -378,9 +378,10 @@ async function reconnectRestoredTabs() { } function handleContextMenu(e: MouseEvent) { - if (!(e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)) { - e.preventDefault(); - } + const target = e.target as HTMLElement; + if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return; + if (target.closest("[data-radix-vue-collection-item], [data-context-menu]")) return; + e.preventDefault(); } onMounted(async () => { diff --git a/src/components/layout/AppTabBar.vue b/src/components/layout/AppTabBar.vue index 2d9ab1e3da..86ce55be05 100644 --- a/src/components/layout/AppTabBar.vue +++ b/src/components/layout/AppTabBar.vue @@ -60,7 +60,7 @@ watch( @scroll="updateScrollButtons" > - +