Skip to content

Commit 9aa4ee7

Browse files
camertronjonrohan
andauthored
Update src/index.js
Co-authored-by: Jon Rohan <[email protected]>
1 parent df389a0 commit 9aa4ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export default function autosize(textarea, {viewportMarginBottom = 100} = {}) {
5050

5151
const textareaStyle = getComputedStyle(textarea)
5252

53-
const topBorderWidth = Math.round(parseFloat(textareaStyle.borderTopWidth))
54-
const bottomBorderWidth = Math.round(parseFloat(textareaStyle.borderBottomWidth))
53+
const topBorderWidth = Math.ceil(parseFloat(textareaStyle.borderTopWidth))
54+
const bottomBorderWidth = Math.ceil(parseFloat(textareaStyle.borderBottomWidth))
5555

5656
const isBorderBox = textareaStyle.boxSizing === 'border-box'
5757
const borderAddOn = isBorderBox ? topBorderWidth + bottomBorderWidth : 0

0 commit comments

Comments
 (0)