mantine icon indicating copy to clipboard operation
mantine copied to clipboard

Mantine Menu Makes Scrollbar Appear/Disappear Quickly

Open justurbo opened this issue 2 years ago • 5 comments

What package has an issue

@mantine/core

Describe the bug

Makes the scrollbar flash when refreshing the page. Content shifts. image

Works as expected. Content doesn't shift. Browser scrollbar is not appearing/disappearing quickly. image

I've tried the withinPortal flag without success. :(

In which browser did the problem occur

Chrome

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

No response

Do you know how to fix the issue

No response

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

No response

Possible fix

No response

justurbo avatar Apr 16 '22 12:04 justurbo

I do not see browser scrollbars on your screenshots.

rtivital avatar Apr 16 '22 14:04 rtivital

I do not see browser scrollbars on your screenshots.

I’ll record it once I get home

justurbo avatar Apr 16 '22 15:04 justurbo

Can no longer reproduce it. Could be a macOS or Chrome issue. This is the URL of the Mantine application that had the scrollbar appear/disappear on page switch/page refresh: https://bit.ly/3uN4EHa

justurbo avatar Apr 16 '22 21:04 justurbo

This issue still seems to exist on both firefox and chromium (CEF) for me.

I've attached two gifs showing the issue. One for CEF and one for Firefox. The issue can be seen when switching to the "library" page.

Source code is roughly equivalent to:

<ScrollArea>
  <SimpleGrid
    <Menu control={Card} >
      <Menu.Label>Settings</Menu.Label>
    </Menu>
    <Menu control={Card} >
      <Menu.Label>Settings</Menu.Label>
    </Menu>
    <Menu control={Card} >
      <Menu.Label>Settings</Menu.Label>
    </Menu>
     more menu items....
  </SimpleGrid>
</ScrollArea>

RaVeN-ShP avatar Jun 19 '22 19:06 RaVeN-ShP

Seems like it's somehow related to React.StrictMode. The problem disappears after disabling it!

RaVeN-ShP avatar Jun 19 '22 19:06 RaVeN-ShP

Strict mode issue: not affecting production, disable strict mode to not have this issue in development.

rtivital avatar Aug 11 '22 16:08 rtivital