Search code examples
twitter-bootstrapsweetalert2

Sweetalert hidden behind the modal box always


I am using sweetalert v2 and also I am using bootstrap models. The problem is whenever I have bootstrap modals open and I have a sweetalert triggered on the button of modal.

The swal() function is triggered but it is always hidden behind the modal. How to make the sweetalert always on top view.


Solution

  • The issue may be you are using tabindex on the modal box. Please remove below attributes from your modal division.

    tabindex="-1" aria-hidden="true" style='z-index:10000;'