This commit is contained in:
Timothy Jaeryang Baek 2026-11-04 19:10:49 +09:00
parent b79a778c03
commit aac0e97627
2 changed files with 2 additions and 2 deletions

View file

@ -107,7 +107,7 @@
$: mainChatActive = fullWidth && tabs.activeId === mainChatTabId;
$: if (fullWidth !== tabs.tabs.some((tab) => tab.id === mainChatTabId)) {
tabs = setFullWidthTabs(tabs, fullWidth, title);
if (fullWidth) void tick().then(() => document.getElementById(domId(mainChatTabId))?.focus());
if (fullWidth) void tick().then(() => document.getElementById(domId(tabs.activeId))?.focus());
}
const toggleLayout = async () => {
if (panelTarget) releasePanel(panelTarget);

View file

@ -39,7 +39,7 @@ export function setFullWidthTabs(state: PanelTabs, fullWidth: boolean, label = '
if (state.tabs.some((tab) => tab.id === mainChatTabId)) return state;
return activateTab(
{ ...state, tabs: [{ id: mainChatTabId, kind: 'chat', label }, ...state.tabs] },
mainChatTabId
state.activeId || mainChatTabId
);
}