Use container wrapper div to detect form width
[MAILPOET-2968]
This commit is contained in:
committed by
Veljko V
parent
75b5279b99
commit
71b5b45991
@@ -68,7 +68,7 @@ jQuery(($) => {
|
||||
}
|
||||
setTimeout(() => {
|
||||
formDiv.addClass('active');
|
||||
checkFormContainer(form);
|
||||
checkFormContainer(formDiv);
|
||||
|
||||
if (showOverlay) {
|
||||
formDiv.prev('.mailpoet_form_popup_overlay').addClass('active');
|
||||
@@ -128,7 +128,7 @@ jQuery(($) => {
|
||||
$('.mailpoet_form').each((index, element) => {
|
||||
// Detect form is placed in tight container
|
||||
const formDiv = $(element);
|
||||
checkFormContainer(formDiv.find('form'));
|
||||
checkFormContainer(formDiv);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -136,7 +136,7 @@ jQuery(($) => {
|
||||
$('form.mailpoet_form').each((index, element) => {
|
||||
const form = $(element);
|
||||
// Detect form is placed in tight container
|
||||
checkFormContainer(form);
|
||||
checkFormContainer(form.closest('div.mailpoet_form'));
|
||||
form.parsley().on('form:validated', () => {
|
||||
// clear messages
|
||||
form.find('.mailpoet_message > p').hide();
|
||||
|
Reference in New Issue
Block a user