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

[v3] Toaster gets rendered behind Slideover's and Modal's overlays #2646

Closed
sandros94 opened this issue Nov 14, 2024 · 1 comment · Fixed by #2650
Closed

[v3] Toaster gets rendered behind Slideover's and Modal's overlays #2646

sandros94 opened this issue Nov 14, 2024 · 1 comment · Fixed by #2650
Assignees
Labels
bug Something isn't working v3 #1289

Comments

@sandros94
Copy link
Collaborator

sandros94 commented Nov 14, 2024

Environment

N/A

Is this bug related to Nuxt or Vue?

Nuxt

Version

commit: 64b703d

Reproduction

<template>
  <div>
    <USlideover side="left">
      <UButton label="Open Slideover" color="neutral" variant="subtle" />
      <template #content>
        <UButton label="Show toast" color="neutral" variant="outline" @click="showToast" />
      </template>
    </USlideover>

    <br>

    <UModal>
      <UButton label="Open Modal" color="neutral" variant="subtle" />
      <template #content>
        <UButton label="Show toast" color="neutral" variant="outline" @click="showToast" />
      </template>
    </UModal>
  </div>
</template>

<script setup lang="ts">
const toast = useToast()

function showToast() {
  toast.add({
    title: 'Test',
    duration: 60 * 1000
  })
}
</script>

Description

Following #2404 resolved via b0be26d

While a Slideover or Modal are open trigger a Toaster and try to interact with it.

20241114-2004-29.4998241.mp4
@sandros94 sandros94 added bug Something isn't working v3 #1289 labels Nov 14, 2024
@sandros94
Copy link
Collaborator Author

sandros94 commented Nov 14, 2024

Couple things I've noticed:

  1. Interestingly, there is already a z-[100] on the ToastViewport
  2. just for fun I added a -z-50 to both slideover's and modal's overlays. They do render behind everything, but still capture the click and prevent any interaction with the toast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants