Skip to content

ContextMenu event not working on certain condition #1741

@Modif93

Description

@Modif93

Describe the bug

hello, I'm using shadcn-svelte with my map project, and there is some issue with ContextMenu of bits-ui.

on reproduction, project is using svelte-maplibre-gl with bits-ui(with shadcn-svelte css)

and ContextMenuComponent i've made(same implementation of bits-ui document) are on both side of reproduction.
on this reproduction, component on right(not on map) is working, but on left(children of Marker), is not working.

tried same pattern with shadcn/ui(@radix-ui/react-context-menu), but it worked fine.

Reproduction

https://codesandbox.io/p/devbox/w8s9f7

Logs

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 2.32 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.12.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.22.0 => 2.37.1 
    bits-ui: ^2.9.6 => 2.9.6 
    svelte: ^5.0.0 => 5.38.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions