mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(reply modal): add autofocus on mobile
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user