Skip to content

Commit

Permalink
fix: textarea input with trim
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleasurecruise committed Dec 7, 2024
1 parent 1bcd7a8 commit 79ed3ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/respository/CommentSubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function CommentSubmit(props: CommentSubmitProps) {
const { t, belongId, className, onSuccess, onFail } = props;

const handleInput: FormEventHandler<HTMLTextAreaElement> = (e) => {
const { value } = e.currentTarget;
const value = e.currentTarget.value.trim();

e.currentTarget.style.height = 'auto';
const newHeight = Math.max(e.currentTarget.scrollHeight + 2, 58);
Expand Down

0 comments on commit 79ed3ab

Please sign in to comment.