diff --git a/packages/web/src/tabpanel/TabRegister.svelte b/packages/web/src/tabpanel/TabRegister.svelte index eb73c09f..4027e3bb 100644 --- a/packages/web/src/tabpanel/TabRegister.svelte +++ b/packages/web/src/tabpanel/TabRegister.svelte @@ -50,6 +50,6 @@ tabComponent={mountedTabs[tabid]} {...openedTabsByTabId[tabid]?.props} {tabid} - tabVisible={tabid == (shownTab && shownTab.tabid)} + tabVisible={tabid == shownTab?.tabid} /> {/each} diff --git a/packages/web/src/tabpanel/TabsContainer.svelte b/packages/web/src/tabpanel/TabsContainer.svelte index 51da6107..179a5977 100644 --- a/packages/web/src/tabpanel/TabsContainer.svelte +++ b/packages/web/src/tabpanel/TabsContainer.svelte @@ -8,7 +8,13 @@ export let multiTabIndex; function findShownTab(tabs: TabDefinition[], multiTabIndex, lockedDbMode, currentDb) { - const selectedTab = tabs.find(x => x.selected && x.closedTime == null && (x.multiTabIndex || 0) == multiTabIndex); + const selectedTab = tabs.find( + x => + x.selected && + x.closedTime == null && + (x.multiTabIndex || 0) == multiTabIndex && + shouldShowTab(x, lockedDbMode, currentDb) + ); if (selectedTab) { return selectedTab; } diff --git a/packages/web/src/tabpanel/TabsPanel.svelte b/packages/web/src/tabpanel/TabsPanel.svelte index d836d0d9..4a310870 100644 --- a/packages/web/src/tabpanel/TabsPanel.svelte +++ b/packages/web/src/tabpanel/TabsPanel.svelte @@ -447,6 +447,11 @@ return x; }) ); + + draggingDbGroup.set(null); + draggingDbGroupTarget.set(null); + draggingTab.set(null); + draggingTabTarget.set(null); } let domTabs;