From ce0b551c59259566073af5e1b805f1848dccb1ee Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 16 Apr 2018 17:52:43 +0300 Subject: [PATCH] some ugly hack to prevent the jump in form height when you input first character --- src/components/post_status_form/post_status_form.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 3348445f..6c95873c 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -240,7 +240,10 @@ const PostStatusForm = { resize (e) { const target = e.target || e target.style.height = 'auto' - target.style.height = `${target.scrollHeight - 10}px` + const heightPx = target.scrollHeight - 10 + if (heightPx > 54) { + target.style.height = `${target.scrollHeight - 10}px` + } if (target.value === '') { target.style.height = '16px' }