We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 684725e + 9aa4ee7 commit 780c32dCopy full SHA for 780c32d
1 file changed
src/index.js
@@ -50,8 +50,8 @@ export default function autosize(textarea, {viewportMarginBottom = 100} = {}) {
50
51
const textareaStyle = getComputedStyle(textarea)
52
53
- const topBorderWidth = parseFloat(textareaStyle.borderTopWidth)
54
- const bottomBorderWidth = parseFloat(textareaStyle.borderBottomWidth)
+ const topBorderWidth = Math.ceil(parseFloat(textareaStyle.borderTopWidth))
+ const bottomBorderWidth = Math.ceil(parseFloat(textareaStyle.borderBottomWidth))
55
56
const isBorderBox = textareaStyle.boxSizing === 'border-box'
57
const borderAddOn = isBorderBox ? topBorderWidth + bottomBorderWidth : 0
0 commit comments