Izitoast is blocking page
pawelkania opened this issue · comments
When using z-index IziToast is blocking whole page.
Steps to reproduce:
- Show toast with high z-index,
- close iziToast,
- after closing
<div class="iziToast-wrapper iziToast-wrapper-center" style="z-index: 99999;"></div>
is still there - it is fullscreen so whole page is blocked by this overlay.
Closing toast should also remove iziToast-wrapper.
In $iziToast.hide
changing $toast.parentNode.remove();
to
if (Object.keys(that.children).length === 0) {
$toast.parentNode.parentNode.remove(); // if last toast remove also wrapper
} else {
$toast.parentNode.remove(); // if not last leave wrapper
}
will resolve problem.