Toasts hidden behind modal
I instantiated one ToastContainer at the top layer of my react application which is always active (rendered). Whenever my react-semantic-ui Modal components are active, they hide any toast created. I tried changing the z-index of ToastContainer to 9999 and my Modal components to 100, but that did not fix the problem. I also tried setting the z-index of each toast to 9999 but that did not work either. The only way I could see the toasts while a Modal was active is to put the ToastContainer within the Modal component. But that ends up causing all toasts outside the Modal component to fail (they do not appear at all). I am using [email protected]. Is there a fix for this (I prefer to stay at version 2.2.1 but will consider any fix for any version).
Hello @jbowen28,
Could you reproduce the issue on codesandbox ? Otherwise, I'll do that when I got some free times.
I'm curious why you don't want to upgrade to v3, could you share your reasons?
Thank you.
I cannot quite get the react-semantic-ui Modal to work in codesandbox. Here is a link to my demo https://codesandbox.io/s/ko7m7r8365. I am testing react-toastify 3.3.1. It appears to have resolved this issue.
@jbowen28 good news. Should I investigate or are you gonna switch to the v3 ?
.Toastify__toast-container { z-index: 200000; }
Add this to fix it
The best answer seems to just put another container on the dialog element it self