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 and dropdown-menu: dialog replaces dropdown-menu on pressing esc button #1229

Closed
lixelv opened this issue Aug 6, 2024 · 3 comments · May be fixed by #1182
Closed

Dialog and dropdown-menu: dialog replaces dropdown-menu on pressing esc button #1229

lixelv opened this issue Aug 6, 2024 · 3 comments · May be fixed by #1182
Labels
status: needs reproduction A reproduction is required to support the issue.

Comments

@lixelv
Copy link

lixelv commented Aug 6, 2024

Describe the bug

Then I'm pressing esc (instead of x (with x everything works fine)) dialog window replaces dropdown menu, here is example how it looks
image

Reproduction

Create dropdown menu, and add there dialog button, as component, here is example, how to do this:

<script>
    import * as DropdownMenu from "$lib/components/ui/dropdown-menu"
    import * as Dialog from "$lib/components/ui/dialog"
</script>

<DropdownMenu.Root>
  <DropdownMenu.Trigger>Open</DropdownMenu.Trigger>
  <DropdownMenu.Content>
    <DropdownMenu.Group>
      <DropdownMenu.Label>My Account</DropdownMenu.Label>
      <DropdownMenu.Separator />
        <Dialog.Root>
          <Dialog.Trigger class="w-full hover:bg-accent hover:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Open</Dialog.Trigger>
          <Dialog.Content>
            <Dialog.Header>
              <Dialog.Title>Are you sure absolutely sure?</Dialog.Title>
              <Dialog.Description>
                This action cannot be undone. This will permanently delete your account
                and remove your data from our servers.
              </Dialog.Description>
            </Dialog.Header>
          </Dialog.Content>
        </Dialog.Root>
    </DropdownMenu.Group>
  </DropdownMenu.Content>
</DropdownMenu.Root>

Logs

No response

System Info

Windows, Chrome

Severity

annoyance

@lixelv lixelv changed the title dialog and dropdown-menu: dialog overlaps dropdown-menu on pressing esc button Dialog and dropdown-menu: dialog replaces dropdown-menu on pressing esc button Aug 19, 2024
@huntabyte huntabyte mentioned this issue Sep 28, 2024
3 tasks
@huntabyte huntabyte added the status: needs reproduction A reproduction is required to support the issue. label Oct 31, 2024
Copy link
Contributor

github-actions bot commented Oct 31, 2024

Please provide a reproduction.

More info

Why do I need to provide a reproduction?

This project is maintained by a very small team, and we simply don't have the bandwidth to investigate issues that we can't easily replicate. Reproductions enable us to fix issues faster and more efficiently. If you care about getting your issue resolved, providing a reproduction is the best way to do that.

I've provided a reproduction - what happens now?

Once a reproduction is provided, we'll remove the needs reproduction label and review the issue to determine how to resolve it. If we can confirm it's a bug, we'll label it as such and prioritize it based on its severity.

If needs reproduction labeled issues don't receive any activity (e.g., a comment with a reproduction link), they'll be closed. Feel free to comment with a reproduction at any time and the issue will be reopened.

How can I create a reproduction?

You can also link to a GitHub repository with the reproduction.

Please ensure that the reproduction is as minimal as possible. If there is a ton of custom logic in your reproduction, it is difficult to determine if the issue is with your code or with the library. The more minimal the reproduction, the more likely it is that we'll be able to assist.

You might also find these other articles interesting and/or helpful:

@huntabyte
Copy link
Owner

Can you still reproduce this with bits-ui@next and shadcn-svelte@next?

@lixelv
Copy link
Author

lixelv commented Oct 31, 2024

Yeah, this issue is fixed in new version, thanks for this library!

@lixelv lixelv closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs reproduction A reproduction is required to support the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants