diff --git a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx index 5b21d2b4c..e85347590 100644 --- a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx @@ -32,9 +32,9 @@ function CreateNote({ }: Props) { const [text, setText] = React.useState(''); const [isPublic, setPublic] = React.useState(false); - const [tag, setTag] = React.useState(); + const [tag, setTag] = React.useState(TAGS[0]); const [useTimestamp, setUseTs] = React.useState(true); - + const inputRef = React.createRef() const { notesStore } = useStore(); React.useEffect(() => { @@ -48,6 +48,12 @@ function CreateNote({ } }, [isEdit]); + React.useEffect(() => { + if (inputRef.current) { + inputRef.current.focus() + } + }, [isVisible]) + const duration = Duration.fromMillis(time).toFormat('mm:ss'); const stopEvents = (e: any) => { e.stopPropagation(); @@ -138,6 +144,7 @@ function CreateNote({