Skip to content

Commit

Permalink
fix: popup input focus on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
rdtabb committed Sep 23, 2023
1 parent e31be31 commit 3e37727
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "meets",
"private": true,
"version": "0.0.0",
"version": "1.0.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/components/AnotherUser/Auserpopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Auserpopup = ({ id }: PropsType) => {
});

useEffect(() => {
setFocus("comment");
if (window.innerWidth > 690) setFocus("comment");
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Profile/AddPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AddPost = () => {
});

useEffect(() => {
setFocus("url");
if (window.innerWidth > 690) setFocus("url");
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Profile/IconPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const IconPopup = () => {
});

useEffect(() => {
setFocus("url");
if (window.innerWidth > 690) setFocus("url");
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Profile/ImagePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ImagePopup = () => {
const commentsQuery = useComments("query", uid, selectedPost?.id);

useEffect(() => {
setFocus("comment");
if (window.innerWidth > 690) setFocus("comment");
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Profile/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Popup = () => {
});

useEffect(() => {
setFocus("username");
if (window.innerWidth > 690) setFocus("username");
}, []);

return (
Expand Down

0 comments on commit 3e37727

Please sign in to comment.