Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(home): make Home the active split when a row is clicked (#8669)

gbirmancc7c7f9921b2
diff --git a/apps/web/src/features/home/components/HomeList.tsx b/apps/web/src/features/home/components/HomeList.tsx
index c7700d8eda..556ded9af2 100644
--- a/apps/web/src/features/home/components/HomeList.tsx
+++ b/apps/web/src/features/home/components/HomeList.tsx
@@ -173,6 +173,8 @@ export function HomeList(props: HomeListProps) {
markEntitySeen(sourceRow.entity);
showPreview(sourceRow.entity, { activate: true });
props.onPreviewActivate?.();
+ // Home keeps the keyboard only when the item opened in Home itself.
+ if (panel.isPanelActive()) listRoot()?.focus({ preventScroll: true });
return;
}
@@ -370,12 +372,18 @@ export function HomeList(props: HomeListProps) {
});
const onRowClick = (rowId: string, event: MouseEvent) => {
+ // Rows cancel their press, so the browser never moves focus into Home.
+ // Activate Home before opening: an item that opens in another split
+ // activates that split afterwards, without a focus change in Home that
+ // the split focus tracker could later use to take activation back.
+ panel.handle.activate();
if (
event.metaKey ||
event.ctrlKey ||
(isTouchDevice() && list.selection.count() > 0)
) {
listInteractions.selection.toggle(rowId);
+ listRoot()?.focus({ preventScroll: true });
return;
}