Skip to content

Popover: Multiple Triggers #1640

@abdel-17

Description

@abdel-17

Describe the bug

I want to use a singleton pattern with the <Popover> component. You can have multiple Popover.Trigger components, but focus always goes back to the last one.

EDIT: I also noticed that the first trigger always opens the popover rather than flip its open state.

Reproduction

https://stackblitz.com/edit/vitejs-vite-r3q6snjf?file=src%2FApp.svelte

Logs

System Info

System:
    OS: Linux 6.6 openSUSE Tumbleweed 20250616
    CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
    Memory: 12.54 GB / 15.15 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.15.1 - /usr/bin/node
    npm: 10.9.2 - /usr/bin/npm
    pnpm: 10.12.4 - /usr/bin/pnpm
  npmPackages:
    bits-ui: ^2.8.10 => 2.8.10
    svelte: ^5.34.9 => 5.34.9

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributions welcomeOpen to contributionsenhancementAn improvement to an existing feature/component

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions