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 0997528e7d
commit 335b46090f
7 changed files with 83 additions and 40 deletions

View File

@@ -23,9 +23,9 @@ const EditorBase = styled.div`
textarea {
resize: none;
padding: 12px;
font-size: 0.875rem;
border-radius: 3px;
white-space: pre-wrap;
font-size: var(--text-size);
background: var(--secondary-header);
}
@@ -101,9 +101,9 @@ export default function MessageEditor({ message, finish }: Props) {
<TextAreaAutoSize
forceFocus
maxRows={3}
padding={12}
value={content}
maxLength={2000}
padding="var(--message-box-padding)"
onChange={(ev) => {
onChange(ev);
setContent(ev.currentTarget.value);