Skip to content

Commit

Permalink
Update src/index.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Rohan <[email protected]>
  • Loading branch information
camertron and jonrohan authored Nov 30, 2023
1 parent df389a0 commit 9aa4ee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default function autosize(textarea, {viewportMarginBottom = 100} = {}) {

const textareaStyle = getComputedStyle(textarea)

const topBorderWidth = Math.round(parseFloat(textareaStyle.borderTopWidth))
const bottomBorderWidth = Math.round(parseFloat(textareaStyle.borderBottomWidth))
const topBorderWidth = Math.ceil(parseFloat(textareaStyle.borderTopWidth))
const bottomBorderWidth = Math.ceil(parseFloat(textareaStyle.borderBottomWidth))

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

0 comments on commit 9aa4ee7

Please sign in to comment.