Skip to content

Add useCapture param to useClickOutside hook #9213

Closed

Description

@StepanSnigur

Dependencies check up

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

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

9.6.2

What package has an issue?

@mantine/hooks

What framework do you use?

Vite

In which browsers you can reproduce the issue?

None

Describe the bug

useClickOutside always listens on the document in the bubble
phase. When a child component stops the event in the capture
phase, the hook doesn't fire at all.

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

No response

Possible fix

Add an optional useCapture parameter (default false) that is
passed to addEventListener / removeEventListener, so callers
can opt into the capture phase.

Self-service

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

Activity

  1. Jubayeromi commented on Sep 25, 2026

    @Jubayeromi

    #9213
    i would like to work on this.

  2. added
    Fixed in patchCompleted issues that will be published with next patch (1.0.X)
    on Sep 26, 2026
  3. github-actions commented on Sep 26, 2026

    @github-actions

    Fixed in 9.6.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in patchCompleted issues that will be published with next patch (1.0.X)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions