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(split-layout): skip search bar on H/L focus restoration (#2791)

gbirmandc724851516e
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx
index 7a0b23af10..6e18e4a118 100644
--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx
@@ -116,6 +116,7 @@ export const SoupSearchbar = (props: SoupSearchbarProps) => {
<div
class="w-full flex items-center shrink-0 grow min-w-0 mobile:-order-2"
data-search-bar-wrapper
+ data-no-focus-restore
>
<div
class={cn(
diff --git a/js/app/packages/app/component/split-layout/SplitLayout.tsx b/js/app/packages/app/component/split-layout/SplitLayout.tsx
index ae4d747f4d..8d641d9b7e 100644
--- a/js/app/packages/app/component/split-layout/SplitLayout.tsx
+++ b/js/app/packages/app/component/split-layout/SplitLayout.tsx
@@ -245,7 +245,11 @@ function createSplitFocusTracker(props: {
if (!element) return;
const parentId = getParentSplitId(element);
- if (parentId && element instanceof HTMLElement) {
+ if (
+ parentId &&
+ element instanceof HTMLElement &&
+ !element.closest('[data-no-focus-restore]')
+ ) {
lastFocusedChildBySplitId.set(parentId, element);
}