Fix: Textarea AutoSize did not resize correctly with long lines.

This commit is contained in:
Paul
2021-07-06 11:04:51 +01:00
parent 56b509a16a
commit b69ba4ca28
7 changed files with 83 additions and 40 deletions

View File

@@ -151,7 +151,7 @@ export const MessageContent = styled.div`
flex-grow: 1;
display: flex;
// overflow: hidden;
font-size: 0.875rem;
font-size: var(--text-size);
flex-direction: column;
justify-content: center;
`;

View File

@@ -65,7 +65,7 @@ const Base = styled.div`
background: var(--message-box);
textarea {
font-size: 0.875rem;
font-size: var(--text-size);
background: transparent;
}
`;
@@ -75,7 +75,7 @@ const Blocked = styled.div`
align-items: center;
padding: 14px 0;
user-select: none;
font-size: 0.875rem;
font-size: var(--text-size);
color: var(--tertiary-foreground);
svg {
@@ -423,10 +423,10 @@ function MessageBox({ channel, draft }: Props) {
autoFocus
hideBorder
maxRows={20}
padding={12}
id="message"
value={draft ?? ""}
onKeyUp={onKeyUp}
value={draft ?? ""}
padding="var(--message-box-padding)"
onKeyDown={(e) => {
if (onKeyDown(e)) return;