Skip to content

Commit

Permalink
Update TextareaAutosize.js
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Apr 15, 2020
1 parent 04a2d92 commit a1ee887
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize(props, ref)
inputShallow.value = input.value || props.placeholder || 'x';
if (inputShallow.value.slice(-1) === '\n') {
// Certain fonts which overflow the line height will cause the textarea
// tto report a different scrollHeight depending on whether the last line
// to report a different scrollHeight depending on whether the last line
// is empty. Make it non-empty to avoid this issue.
inputShallow.value += ' ';
}
Expand Down

0 comments on commit a1ee887

Please sign in to comment.