mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.94k stars 1.9k forks source link

Mantine Modals throw an error when clicking mouse fast #2450

Closed atumas-bananamilk closed 2 years ago

atumas-bananamilk commented 2 years ago

What package has an issue

@mantine/modals

Describe the bug

My setup is pretty complex so I'm not sure I'd be able to create a minimal reproduction sample because I don't know what could be affecting this.

I also couldn't fix nor patch this bug internally. I tried.

It's a strange error. The error occurs when I:

Then I see this error:

Screenshot 2022-09-15 at 07 20 17

If I don't click my mouse fast, it doesn't throw an error. I tested at least 100 times - it's definitely not at random, it only happens when mouse is being clicked many times. I know, strange.

Some info from my setup: _app.tsx:

    <>
      <RecoilRoot>
        <AuthProvider session={props.session}>
          <ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={toggleColorScheme}>
            <MantineProvider theme={getThemeProps(colorScheme, colorTheme)} withGlobalStyles withNormalizeCSS>
              <ModalsProvider>
                <NotificationsProvider limit={6} position="bottom-right">
                  <PageProgress />
                  <Component {...pageProps} />
                </NotificationsProvider>
              </ModalsProvider>
            </MantineProvider>
          </ColorSchemeProvider>
        </AuthProvider>
      </RecoilRoot>
      <Toaster/>
    </>

package.json:

    ...
    "@mantine/core": "^5.1.5",
    "@mantine/dropzone": "^5.1.5",
    "@mantine/form": "^5.1.5",
    "@mantine/hooks": "^5.1.5",
    "@mantine/modals": "^5.3.1",
    "@mantine/next": "^5.1.5",
    "@mantine/notifications": "^5.1.5",
    ...

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

5.1.5

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

No response

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

Possible fix

N/A

rtivital commented 2 years ago

Hi @atumas-bananamilk, it is not possible to identify the issue without reproduction

rtivital commented 2 years ago

Hi @atumas-bananamilk, feel free to reopen the issue if you can provide a reproduction