mantine icon indicating copy to clipboard operation
mantine copied to clipboard

Textarea with autosize shows scrollbar when the text still fit the `maxRow`

Open italodeandra opened this issue 2 years ago • 2 comments

What package has an issue

@mantine/core

Describe the bug

Video demonstrating the bug:

https://user-images.githubusercontent.com/19225266/190802117-af029dc3-dc78-4dc5-91fa-779c889919a6.mp4

I'm not even using maxRows and the scrollbar still shows after I paste a big text, or programmatically update the field value with a big text.

What version of @mantine/hooks page do you have in package.json?

5.3.2

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/mantine-textarea-autosize-issue-4yn0gz?file=/src/App.tsx

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

italodeandra avatar Sep 16 '22 21:09 italodeandra

Textarea is built with react-textarea-autosize package, this issue is not fixable on our side, you can report the issue in https://github.com/Andarist/react-textarea-autosize repository.

rtivital avatar Sep 17 '22 05:09 rtivital

I've used the same package on previous personal UI libraries, and MUI also uses it and I've never seen this issue.

Can you reopen the issue? I'll work on it then, because I'm 100% sure this is on Mantine's side.

italodeandra avatar Sep 17 '22 13:09 italodeandra

Hey Vitaly, I moved out of Mantine for personal reasons, so I won't be working on this issue anymore. I'm sorry man.

italodeandra avatar Oct 31 '22 19:10 italodeandra

setting styles: { input: { overflow: "hidden" } } was the quick fix for us to remove the unwarranted Textarea scroll behavior.

clayreinhardt avatar Nov 16 '23 16:11 clayreinhardt

In my case I had to set the overflow on textarea:

sx={{textarea: {overflow: 'hidden'}}}

kyczawon avatar Feb 10 '24 18:02 kyczawon