vue-sonner icon indicating copy to clipboard operation
vue-sonner copied to clipboard

Possible bugs when using fixed

Open AQian0 opened this issue 1 year ago • 1 comments

The popup toast is covered by other components. image

At first I thought it might be the z-index that was causing this, however after I changed it to an extremely large value the situation remained unchanged. At this point I noticed that the section tag was in a strange place in the DOM - it was not under the root component nor under the component where the toaster is located. This is shown in the image below: image

I realised that it was probably fixed causing the problem, so I cleared it and eventually the toast was able to display properly. image image

This seems to be caused by the DOM node being added to the wrong location... I'm sorry, but I'm not really sure how this component works, so I can't give any more information.

AQian0 avatar Feb 02 '24 09:02 AQian0

As possible solution - use teleport

<teleport to="body">
    <Toaster richColors class="pointer-events-auto" :expand="true" theme="system"/>
</teleport>

uacode avatar Jun 25 '25 19:06 uacode