ux: auto-focus the chat input box (#3941)
* ux: auto-focus the chat input box and search box when switching between pages and thread lists * chore: remove autofocus hub
This commit is contained in:
parent
3c721cb97d
commit
755b2f234b
@ -269,10 +269,13 @@ const RichTextEditor = ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!ReactEditor.isFocused(editor)) {
|
||||||
|
ReactEditor.focus(editor)
|
||||||
|
}
|
||||||
if (textareaRef.current) {
|
if (textareaRef.current) {
|
||||||
textareaRef.current.focus()
|
textareaRef.current.focus()
|
||||||
}
|
}
|
||||||
}, [activeThreadId])
|
}, [activeThreadId, editor])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (textareaRef.current?.clientHeight) {
|
if (textareaRef.current?.clientHeight) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user