Focus on editor upon page loading

This commit is contained in:
MartinBraquet
2025-10-22 14:47:07 +02:00
parent e3fa4efa95
commit f6059ef5c7

View File

@@ -145,6 +145,12 @@ export const PrivateChat = (props: {
placeholder: 'Send a message',
})
useEffect(() => {
if (editor) {
editor.commands.focus()
}
}, [editor])
useEffect(() => {
setAsSeen(channelId)
}, [JSON.stringify(messages)])