From: Dessalines Date: Wed, 27 Jan 2021 15:29:01 +0000 (-0500) Subject: Fixing post title height. Fixes #147 X-Git-Url: http://these/git/%22https:/www.exeterceilidhs.net/%22%7B%7D/static/%7Bpost.url%7D?a=commitdiff_plain;h=cab454dd89f65d74948214762e8a99c6cd093647;p=lemmy-ui.git Fixing post title height. Fixes #147 --- diff --git a/src/shared/components/post-form.tsx b/src/shared/components/post-form.tsx index 08a5014..4295a62 100644 --- a/src/shared/components/post-form.tsx +++ b/src/shared/components/post-form.tsx @@ -37,6 +37,7 @@ import { wsClient, authField, } from '../utils'; +import autosize from 'autosize'; var Choices; if (isBrowser()) { @@ -125,6 +126,10 @@ export class PostForm extends Component { componentDidMount() { setupTippy(); this.setupCommunities(); + let textarea: any = document.getElementById('post-title'); + if (textarea) { + autosize(textarea); + } } componentDidUpdate() { @@ -252,7 +257,7 @@ export class PostForm extends Component { !validTitle(this.state.postForm.name) && 'is-invalid' }`} required - rows={2} + rows={1} minLength={3} maxLength={MAX_POST_TITLE_LENGTH} />