revert change to form resize logic

This commit is contained in:
Henry Jameson 2020-08-18 23:50:23 +03:00
parent a6223cec0c
commit 7de78b1401

View File

@ -481,7 +481,7 @@ const PostStatusForm = {
// BEGIN content size update // BEGIN content size update
target.style.height = 'auto' target.style.height = 'auto'
const heightWithoutPadding = Math.ceil(target.scrollHeight - vertPadding) + 1 const heightWithoutPadding = Math.floor(target.scrollHeight - vertPadding)
let newHeight = this.maxHeight ? Math.min(heightWithoutPadding, this.maxHeight) : heightWithoutPadding let newHeight = this.maxHeight ? Math.min(heightWithoutPadding, this.maxHeight) : heightWithoutPadding
// This is a bit of a hack to combat target.scrollHeight being different on every other input // This is a bit of a hack to combat target.scrollHeight being different on every other input
// on some browsers for whatever reason. Don't change the height if difference is 1px or less. // on some browsers for whatever reason. Don't change the height if difference is 1px or less.