fix: enable tab context menu (close all/close others/close right)

This commit is contained in:
t8y2
2026-05-09 11:56:09 +08:00
parent 1a1f128f2b
commit 4c5de25f95
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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 () => {
+1 -1
View File
@@ -60,7 +60,7 @@ watch(
@scroll="updateScrollButtons"
>
<ContextMenu v-for="tab in queryStore.tabs" :key="tab.id">
<ContextMenuTrigger as-child>
<ContextMenuTrigger class="h-full">
<Tooltip>
<TooltipTrigger as-child>
<div