fix: Various fixes for commenting on mobile (#5195

* fix: Comment sidebar chopped on mobile
fix: Zoom on comment input focus on mobile

* fix: Always show reply option on mobile

* fix: Auto-expand comment sidebar if linked to a specific comment
This commit is contained in:
Tom Moor
2023-04-12 22:00:00 -04:00
committed by GitHub
parent 821c9368f6
commit 7c44e116fc
5 changed files with 48 additions and 32 deletions

View File

@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import scrollIntoView from "smooth-scroll-into-view-if-needed";
import styled, { css } from "styled-components";
import breakpoint from "styled-components-breakpoint";
import { s } from "@shared/styles";
import Comment from "~/models/Comment";
import Document from "~/models/Document";
@@ -206,13 +207,16 @@ const Reply = styled.button`
font-size: 14px;
-webkit-appearance: none;
cursor: var(--pointer);
opacity: 0;
transition: opacity 100ms ease-out;
position: absolute;
text-align: left;
width: 100%;
bottom: -30px;
left: 32px;
${breakpoint("tablet")`
opacity: 0;
`}
`;
const Thread = styled.div<{