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

This commit is contained in:
shpuld 2018-04-16 17:52:43 +03:00
parent 5bc7ecdb3b
commit ce0b551c59

View file

@ -240,7 +240,10 @@ const PostStatusForm = {
resize (e) {
const target = e.target || e
target.style.height = 'auto'
const heightPx = target.scrollHeight - 10
if (heightPx > 54) {
target.style.height = `${target.scrollHeight - 10}px`
}
if (target.value === '') {
target.style.height = '16px'
}