Skip to content

Quickly right clicking fails to close already opened context menus #1743

@rogerfar

Description

@rogerfar

Describe the bug

If you have a lot of context menus on the page and you right click between different elements, it starts behaving oddly. Over time it will stop opening, or not closing others.

Easiest to see what's going on is using the reproduction and right click quickly on different element.

Image

Reproduction

https://stackblitz.com/edit/shadcn5-repro-template-1ptjrqeo?file=src%2FApp.svelte

Logs

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700
    Memory: 30.62 GB / 63.79 GB
  Binaries:
    Node: 22.19.0 - C:\Program Files\nodejs\node.EXE 
    Yarn: 1.22.22 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 11.6.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.13.1 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.19041.5794
  npmPackages:
    @sveltejs/kit: 2.38.0 => 2.38.0
    bits-ui: ^2.9.6 => 2.9.6
    svelte: ^5.38.8 => 5.38.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterThe issue or PR requires some additional information or action from the submitter.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions