nuxt / nuxt/ui

[Bug] UPopover appears on top of UModal based on component declaration order

Open
#6,550 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream/reka-ui
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
Environment

Vite project info (@nuxt/ui/vite):

Operating system Windows 11
CPU 13th Gen Intel(R) Core(TM) i7-13650HX
Node.js version v24.15.0
Package manager pnpm@11.0.9
Builder vite@8.0.8
Is this bug related to Nuxt or Vue?

Vue

Package

v4.x

Version

v4.8.1

Reproduction

https://codesandbox.io/p/devbox/boring-dew-4myj43?workspaceId=ws_DQFGyLZQ7dm97uDZVPVdBv (fix permission)

Description

If I try to use the UModal and UPopover components in this order:

    <UModal>
      <UButton label="Open modal" color="neutral" variant="subtle" />

      <template #content>
        <div class="h-48 m-4">Some modal</div>
      </template>
    </UModal>

    <UPopover :dismissible="false">
      <UButton label="Open popover" color="neutral" variant="subtle" />

      <template #content>
        <div class="size-48 m-4 inline-flex">Some popover</div>
      </template>
    </UPopover>

When opening the popover first and then the modal, the popover appears on top of the modal.

Image

If the components are declared in the opposite order, the bug no longer reproduces.

Additional context

No response

Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and compare the UModal and UPopover behavior when they are declared in each order. Trace how their overlay layers are created and verify the fix by opening the popover first, then the modal; done means the modal remains above the popover in both declaration orders.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.