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
1 changed files with 4 additions and 1 deletions

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'
}