feat(reply modal): add autofocus on mobile

This commit is contained in:
Tom (plebeius.eth)
2024-09-20 15:38:16 +02:00
parent f247f0e995
commit c58a6bceec
+2 -2
View File
@@ -132,14 +132,14 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
: `The subplebbit might be offline and publishing might fail.`;
useEffect(() => {
if (showReplyModal && !isMobile) {
if (showReplyModal) {
setTimeout(() => {
if (textRef.current) {
textRef.current.focus();
}
}, 0);
}
}, [showReplyModal, isMobile]);
}, [showReplyModal]);
useEffect(() => {
if (textRef.current) {