Adding post title expanding on copy. Fixes #168
authorDessalines <tyhou13@gmx.com>
Mon, 8 Feb 2021 16:36:16 +0000 (11:36 -0500)
committerDessalines <tyhou13@gmx.com>
Mon, 8 Feb 2021 16:36:16 +0000 (11:36 -0500)
src/shared/components/post-form.tsx

index 7f5c7fbaa2fb57616aefa5c305b0ff305b85a86c..553a6e6aae374c058a4bdf906dcfb83b465d2405 100644 (file)
@@ -399,6 +399,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
       MAX_POST_TITLE_LENGTH
     );
     i.state.suggestedTitle = undefined;
+    setTimeout(() => {
+      let textarea: any = document.getElementById('post-title');
+      autosize.update(textarea);
+    }, 10);
     i.setState(i.state);
   }