fix for z-index of modals
This commit is contained in:
parent
bb8cc2ab17
commit
bf1c7373ff
@ -10,10 +10,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
var trigger = document.querySelector(modal.dataset.trigger);
|
||||
var closeBound;
|
||||
|
||||
this.open = function openFn() {
|
||||
this.open = function openFn(event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
modal.classList.add('modal--open');
|
||||
overlay.classList.add('modal__overlay');
|
||||
modal.parentNode.insertBefore(overlay, modal);
|
||||
document.body.insertBefore(modal, null);
|
||||
document.body.insertBefore(overlay, modal);
|
||||
overlay.classList.add('modal__overlay--open');
|
||||
toggleScroll(false);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user