mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-29 16:18:55 +00:00
fix: enable tab context menu (close all/close others/close right)
This commit is contained in:
+4
-3
@@ -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 () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user