Only show cursor if focused

This commit is contained in:
Ian Philips 2022-05-03 16:45:21 -04:00
parent 3a33efa8db
commit 0d63e471be

View File

@ -299,7 +299,7 @@ export function CommentInput(props: {
onChange={(e) => setComment(e.target.value)}
className="textarea textarea-bordered w-full resize-none"
placeholder="Add a comment..."
autoFocus={true}
autoFocus={focused}
rows={answerOutcome == undefined || focused ? 3 : 1}
onFocus={() => setFocused(true)}
onBlur={() => !comment && setFocused(false)}