a tool for shared writing and social publishing

autoFocus reply box when opened

+7
+6
app/lish/[did]/[publication]/[rkey]/Interactions/Comments/CommentBox.tsx
··· 40 40 doc_uri: string; 41 41 replyTo?: string; 42 42 onSubmit?: () => void; 43 + autoFocus?: boolean; 43 44 }) { 44 45 let mountRef = useRef<HTMLPreElement | null>(null); 45 46 let quote = useInteractionState((s) => s.commentBox.quote); ··· 145 146 }, 146 147 }, 147 148 ); 149 + 150 + if (props.autoFocus) { 151 + view.current.focus(); 152 + } 153 + 148 154 return () => { 149 155 view.current?.destroy(); 150 156 view.current = null;
+1
app/lish/[did]/[publication]/[rkey]/Interactions/Comments/index.tsx
··· 191 191 <CommentBox 192 192 doc_uri={props.document} 193 193 replyTo={props.comment_uri} 194 + autoFocus={true} 194 195 onSubmit={() => { 195 196 setReplyBoxOpen(false); 196 197 }}