tab drag&drop fix

This commit is contained in:
Jan Prochazka 2023-03-05 15:28:29 +01:00
parent f5d41c89e6
commit ff044ebec8
3 changed files with 13 additions and 2 deletions

View File

@ -50,6 +50,6 @@
tabComponent={mountedTabs[tabid]}
{...openedTabsByTabId[tabid]?.props}
{tabid}
tabVisible={tabid == (shownTab && shownTab.tabid)}
tabVisible={tabid == shownTab?.tabid}
/>
{/each}

View File

@ -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;
}

View File

@ -447,6 +447,11 @@
return x;
})
);
draggingDbGroup.set(null);
draggingDbGroupTarget.set(null);
draggingTab.set(null);
draggingTabTarget.set(null);
}
let domTabs;