diff --git a/cptr/frontend/src/lib/components/Bar.svelte b/cptr/frontend/src/lib/components/Bar.svelte index 264a28c..d20b06a 100644 --- a/cptr/frontend/src/lib/components/Bar.svelte +++ b/cptr/frontend/src/lib/components/Bar.svelte @@ -35,7 +35,7 @@ active: direction === 'horizontal', onclick: () => { setSplitDirection('horizontal'); - if (!$splitActive) splitCurrentTab('horizontal'); + splitCurrentTab('horizontal'); } }, { @@ -44,7 +44,7 @@ active: direction === 'vertical', onclick: () => { setSplitDirection('vertical'); - if (!$splitActive) splitCurrentTab('vertical'); + splitCurrentTab('vertical'); } } ]; diff --git a/cptr/frontend/src/lib/components/GroupTabBar.svelte b/cptr/frontend/src/lib/components/GroupTabBar.svelte index 165d417..99e7dc9 100644 --- a/cptr/frontend/src/lib/components/GroupTabBar.svelte +++ b/cptr/frontend/src/lib/components/GroupTabBar.svelte @@ -142,6 +142,7 @@ // Only accept tab drags (not file uploads) if (!e.dataTransfer || !hasTabDrag(e.dataTransfer)) return; e.preventDefault(); + e.stopPropagation(); e.dataTransfer.dropEffect = 'move'; dropHighlight = true; } @@ -155,8 +156,9 @@ if (!e.dataTransfer) return; const payload = readTabDragPayload(e.dataTransfer); if (!payload) return; - if (payload.groupId === group.id) return; // same group, ignore e.preventDefault(); + e.stopPropagation(); + if (payload.groupId === group.id) return; // same group, ignore moveTabToGroup(payload.tabId, payload.groupId, group.id); } @@ -208,7 +210,7 @@ const tab = contextMenu.tab; const items: { label: string; icon?: string; onclick: () => void; divider?: boolean }[] = []; - if (isWideScreen && tab.type === 'file' && tab.filePath && !$splitActive) { + if (isWideScreen && tab.type === 'file' && tab.filePath) { items.push({ label: $t('bar.splitRight'), icon: 'split-horizontal', @@ -242,7 +244,7 @@ active: direction === 'horizontal', onclick: () => { setSplitDirection('horizontal'); - if (!$splitActive) splitCurrentTab('horizontal'); + splitCurrentTab('horizontal'); } }, { @@ -251,7 +253,7 @@ active: direction === 'vertical', onclick: () => { setSplitDirection('vertical'); - if (!$splitActive) splitCurrentTab('vertical'); + splitCurrentTab('vertical'); } } ]; @@ -373,8 +375,8 @@