Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next: popover not closing when interacting outside #861

Closed
syedkhairi opened this issue Nov 2, 2024 · 5 comments
Closed

next: popover not closing when interacting outside #861

syedkhairi opened this issue Nov 2, 2024 · 5 comments
Assignees

Comments

@syedkhairi
Copy link

Describe the bug

This is a hit and miss, sometimes when interacting outside, it closes, sometimes it doesn't.

In the first part of the video, it shows a dropdown, and when hover, it opens a popover, if I interact or hover on popover, then it wouldn't close the dropdown when interact outside.

In the second part of the video, it is purely popover, which sometimes closes when interacting outside, otherwise have to click the trigger to close.

popover_sometimes_not_closing.mp4

Reproduction

Struggling to reproduce tho, but working on it here.

Logs

No response

System Info

System:
    OS: macOS 15.1
    CPU: (8) arm64 Apple M1
    Memory: 84.39 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.8.1 - /opt/homebrew/bin/npm
    pnpm: 9.4.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 130.0.6723.92
    Edge: 129.0.2792.89
    Safari: 18.1
  npmPackages:
    @sveltejs/kit: ^2.7.2 => 2.7.2 
    bits-ui: ^1.0.0-next.37 => 1.0.0-next.37 
    cmdk-sv: ^0.0.18 => 0.0.18 
    formsnap: ^2.0.0-next.0 => 2.0.0-next.0 
    mode-watcher: ^0.4.1 => 0.4.1 
    svelte: ^5.0.3 => 5.0.3 
    svelte-radix: ^1.1.1 => 1.1.1 
    svelte-sonner: ^0.3.28 => 0.3.28 
    sveltekit-superforms: ^2.20.0 => 2.20.0

Severity

annoyance

@huntabyte
Copy link
Owner

I definitely see what you're referring to in the video, but I will need a minimal repro to debug properly.

@huntabyte
Copy link
Owner

Also going to move this to bits-ui as it would be responsible for that functionality vs shadcn-svelte.

@huntabyte huntabyte transferred this issue from huntabyte/shadcn-svelte Nov 3, 2024
@syedkhairi
Copy link
Author

Thanks - so, I've updated all of my shadcn-svelte ui components just to be sure, and I also noticed cmd-sv is no longer a dependency? Not sure if that's got anything to do with it.

The problem in the second half of the video now gone - it works all as expected.

However, the first problem is not related to popover but hover card or link preview when inside a dropdown. I'm able to reproduce it here. Is it something I do wrong?

@huntabyte
Copy link
Owner

It doesn't appear you're doing anything wrong! I have a hunch as to what it is, let me look into it.

@huntabyte
Copy link
Owner

Fixed in [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants