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[mobile]: don't focus new splitcontainers on mobile (#2641)

Peter Chinmanc865056b4c63
diff --git a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx b/js/app/packages/app/component/split-layout/components/SplitContainer.tsx
index 640a9d8079..616f0d2ee8 100644
--- a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitContainer.tsx
@@ -41,6 +41,7 @@ export function SplitContainer(
const [ref, setRef] = createSignal<HTMLDivElement>();
createEffect(
on([ref], () => {
+ if (isMobile()) return;
ref()?.focus();
})
);
diff --git a/js/app/packages/channel/Input/ChannelInput.tsx b/js/app/packages/channel/Input/ChannelInput.tsx
index 868f625aaf..0ea4e6aed0 100644
--- a/js/app/packages/channel/Input/ChannelInput.tsx
+++ b/js/app/packages/channel/Input/ChannelInput.tsx
@@ -177,7 +177,7 @@ export function ChannelInput(props: ChannelInputProps) {
config={markdownEditor}
placeholder={inputState.view().placeholder}
initialValue={inputState.view().value}
- autofocus={props.autofocus ?? !isMobile()}
+ autofocus={!isMobile() && (props.autofocus ?? true)}
class="text-sm"
/>
</Input.Editor>