mantine icon indicating copy to clipboard operation
mantine copied to clipboard

`ScrollArea` `ScrollBar` size not updating

Open pfo-omicsstudio opened this issue 5 months ago • 0 comments

Dependencies check up

  • [x] I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

8.1.0

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Not applicable – issue is not related to the browser

Describe the bug

When adding content to a ScrollArea, the vertical scrollbar appears, but it never updates its size when new content is added dynamically.

https://github.com/user-attachments/assets/72dcf1a8-f82c-44b1-a5cc-3f549b6d2941

This bug does not occur in version 7.17.5 and below. I dug around and Mantine 7.17.6 changed ScrollArea root display from table to block, which seems to cause this.

Adding the following CSS rule to my project on version 8.1.0 (where the bug occurs):

.mantine-ScrollArea-root {
  display: table;
}

fixes the problem.

For some reason, I am unable to replicate it in codesandbox, so I have not provided a link to a repro. I even tried stripping down my app to the bare minimum components and it still happened, so I do not know why I cannot get it to happen in codesandbox.

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

Change ScrollArea root display back to table.

Self-service

  • [ ] I would be willing to implement a fix for this issue

pfo-omicsstudio avatar Jun 12 '25 12:06 pfo-omicsstudio