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

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

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

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

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 linked a pull request Sep 28, 2024 that will close this issue
8 tasks
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

Successfully merging a pull request may close this issue.

1 participant