diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte index 8237d5858d..8ed982f2d6 100644 --- a/src/lib/components/channel/Channel.svelte +++ b/src/lib/components/channel/Channel.svelte @@ -88,6 +88,7 @@ let scrollEnd = true; let messagesContainerElement = null; let chatInputElement = null; + let threadChatInputElement = null; let top = false; @@ -475,8 +476,10 @@ await tick(); chatInputElement?.focus(); }} - onThread={(id) => { + onThread={async (id) => { threadId = id; + await tick(); + threadChatInputElement?.focus(); }} onPin={pinHandler} onLoad={async () => { @@ -539,6 +542,7 @@ { threadId = null; @@ -560,6 +564,7 @@ { threadId = null; diff --git a/src/lib/components/channel/Thread.svelte b/src/lib/components/channel/Thread.svelte index f18352e84d..87f0638ad0 100644 --- a/src/lib/components/channel/Thread.svelte +++ b/src/lib/components/channel/Thread.svelte @@ -17,6 +17,7 @@ export let threadId = null; export let channel = null; + export let chatInputElement = null; export let onClose = () => {}; export let onPin = () => {}; @@ -27,7 +28,6 @@ let top = false; let messagesContainerElement = null; - let chatInputElement = null; let replyToMessage = null;