fix jumping inputbox's height
This commit is contained in:
parent
15a7151ade
commit
57e91bc783
1 changed files with 6 additions and 8 deletions
|
@ -239,14 +239,12 @@ const PostStatusForm = {
|
||||||
e.dataTransfer.dropEffect = 'copy'
|
e.dataTransfer.dropEffect = 'copy'
|
||||||
},
|
},
|
||||||
resize (e) {
|
resize (e) {
|
||||||
const target = e.target || e
|
const vertPadding = window.getComputedStyle(e.target)['padding-top'] +
|
||||||
target.style.height = 'auto'
|
window.getComputedStyle(e.target)['padding-bottom']
|
||||||
const heightPx = target.scrollHeight - 10
|
e.target.style.height = 'auto'
|
||||||
if (heightPx > 54) {
|
e.target.style.height = `${e.target.scrollHeight - vertPadding}px`
|
||||||
target.style.height = `${target.scrollHeight - 10}px`
|
if (e.target.value === '') {
|
||||||
}
|
e.target.style.height = '16px'
|
||||||
if (target.value === '') {
|
|
||||||
target.style.height = '16px'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearError () {
|
clearError () {
|
||||||
|
|
Loading…
Reference in a new issue