diff options
| author | shpuld <shp@cock.li> | 2018-04-16 17:52:43 +0300 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2018-04-16 17:52:43 +0300 |
| commit | ce0b551c59259566073af5e1b805f1848dccb1ee (patch) | |
| tree | a4c19d6ab5e5e306a4fe8edf919ff9e18810e17f /src | |
| parent | 5bc7ecdb3b34d1bd93b9239d300909f34b1d2fe7 (diff) | |
some ugly hack to prevent the jump in form height when you input first character
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 5 |
1 files changed, 4 insertions, 1 deletions
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' } |
