logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: ce0b551c59259566073af5e1b805f1848dccb1ee
parent: 5bc7ecdb3b34d1bd93b9239d300909f34b1d2fe7
Author: shpuld <shp@cock.li>
Date:   Mon, 16 Apr 2018 17:52:43 +0300

some ugly hack to prevent the jump in form height when you input first character

Diffstat:

Msrc/components/post_status_form/post_status_form.js5++++-
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 @@ -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' }