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

[Dialog, Popover] manually setting open to false does not restore focus to trigger #1109

Closed
anatolzak opened this issue Mar 20, 2024 · 0 comments · Fixed by #1110 or #1126 · May be fixed by patooworld/novel#3
Closed

[Dialog, Popover] manually setting open to false does not restore focus to trigger #1109

anatolzak opened this issue Mar 20, 2024 · 0 comments · Fixed by #1110 or #1126 · May be fixed by patooworld/novel#3
Labels
bug Something isn't working

Comments

@anatolzak
Copy link
Contributor

Describe the bug

This issue was first mentioned here #960, but figured I would open a new issue since #960 is about exposing additional stuff.

When using a dialog or popover, if you manually set the open store to false, the focus does not restore to the trigger.

Screen.Recording.2024-03-20.at.2.24.07.PM.mov

Reproduction

https://stackblitz.com/edit/github-bn3cdm?file=src/routes/+page.svelte

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (6) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.3 - /usr/local/bin/pnpm
  npmPackages:
    @melt-ui/svelte: latest => 0.76.0 
    @sveltejs/kit: ^2.0.0 => 2.5.4 
    svelte: ^4.1.2 => 4.2.12

Severity

annoyance

@anatolzak anatolzak added the bug Something isn't working label Mar 20, 2024
@anatolzak anatolzak changed the title [Dialog, Popover] manually setting open to false does not focus trigger [Dialog, Popover] manually setting open to false does not restore focus to trigger Mar 20, 2024
This was referenced Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant