Fix body scrolling when modal is displayed

[MAILPOET-1510]
This commit is contained in:
Jan Jakeš
2019-01-16 16:35:13 +01:00
parent bf62034b4a
commit affab195ca
2 changed files with 2 additions and 3 deletions

View File

@@ -45,9 +45,6 @@ body.mailpoet_modal_opened
background-color: overlay_background_color !important background-color: overlay_background_color !important
display: flex !important display: flex !important
.mailpoet_modal_opened .mailpoet_modal_overlay
display: block
// modal popup // modal popup
.mailpoet_popup .mailpoet_popup
z-index: 25 z-index: 25

View File

@@ -458,10 +458,12 @@ define('modal', ['mailpoet', 'jquery'],
}, },
showOverlay: function () { showOverlay: function () {
jQuery('#mailpoet_modal_overlay').show(); jQuery('#mailpoet_modal_overlay').show();
jQuery('body').addClass('mailpoet_modal_opened');
return this; return this;
}, },
hideOverlay: function () { hideOverlay: function () {
jQuery('#mailpoet_modal_overlay').hide(); jQuery('#mailpoet_modal_overlay').hide();
jQuery('body').removeClass('mailpoet_modal_opened');
return this; return this;
}, },
popup: function (opts) { popup: function (opts) {