• Resolved s4s

    (@s4s)


    I’m using Easy Modal to run Gravity Forms surveys in popup boxes. The easy modal popups won’t close on “Escape” or with the close button (top right), as per : wwww.school4schools.com >> select “Academic Needs Survey” to see the issue.

    I installed your update today, but I can’t say if it’s related or not, as I only tested it out today for the first time in a few days. The only other change from when it was working previously was to test out today Better WordPress minify, which I uninstalled. Otherwise the site is all the same as before the update.

    Will very much appreciate your help.

    https://www.ads-software.com/plugins/easy-modal/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    Hey s4s the domain above doesnt seem to work. Loads a cpanel default page.

    Can you let me know when you get it up?

    Thread Starter s4s

    (@s4s)

    Sorry about the typo in my domain link above. It’s active at https://www.school4schools.com

    Thanks for your help!

    Thread Starter s4s

    (@s4s)

    Btw, I’m thinking I should upgrade to your pro version but I was unable to figure out the theme options from your website. Any advice on that as well, will be appreciated.

    For others to know: your plugin is the only one I could find to work effectively with Gravity Forms. Very much appreciated.

    Plugin Author Daniel Iser

    (@danieliser)

    I think i know whats going on. I see you have overlay disabled. I will fix it in tonights update.

    Thread Starter s4s

    (@s4s)

    Thanks for your attention here. The update came through and I installed it.

    I also unchecked the “disable overlay” option (which in the past I left unchecked; just had it on to test out the current problem and forgot to uncheck it again).

    The popup now closes on upper right corner click and Escape button, but the “fade” view of the site does not close. drop the faded-out view of the site that loads w the popup.

    Btw, can I change close the button image? Or is it missing in my install? You’ll see when you look: https://www.school4schools.com.

    Thanks!

    Plugin Author Daniel Iser

    (@danieliser)

    Can you edit the plugins easy-modal-site.js file inside the assets/scripts folder?

    I dont wanna release another patch without gettig it tested.

    Replace this line which is maybe 7 lines from the bottom.

    if (settings.meta.display.overlay_disabled && jQuery('#' + settings.overlay.attr.id).is(":visible")) {

    with

    if (!settings.meta.display.overlay_disabled && jQuery('#' + settings.overlay.attr.id).is(":visible")) {

    Thread Starter s4s

    (@s4s)

    Will do and let you know. Thanks!

    Thread Starter s4s

    (@s4s)

    I made the change, so see what goes.

    On my immediate test, the close via right-top box click or Escape key do not work now.

    Thread Starter s4s

    (@s4s)

    … okay, with Overlay Disabled, it works perfectly. I will leave it for today with Overlay Disabled on the 1st popup, “Visitor Survey” and not disabled on “Free Consultation.”

    You will notice that the first one works fine, but the second has the problem with closing (Disable Overlay not selected)

    Plugin Author Daniel Iser

    (@danieliser)

    Testing this a bit more. Will get back with you.

    Plugin Author Daniel Iser

    (@danieliser)

    Try replacing the whole last section with this.

    jQuery(document).ready(function () {
        jQuery('.emodal')
            .emodal()
            .each(function () {
                var $this = jQuery(this);
                jQuery('.' + $this.attr('id')).on('click', function (e) {
                    e.preventDefault();
                    e.stopPropagation();
                    $this.emodal('open');
                });
                jQuery('.' + $this.attr('id')).css('cursor', 'pointer');
            })
    
            // Close Overlay
            .on('emodalBeforeClose', function (e) {
                var $this = jQuery(this),
                    settings = $this.data('emodal'),
                    $overlay = jQuery('#' + settings.overlay.attr.id);
    console.log(settings, $overlay);
                if ($overlay.length && $overlay.is(":visible")) {
                    $overlay.fadeOut(settings.close.close_speed);
                }
            })
            // Reset Videos
            .on('emodalAfterClose', function (e) {
                var $this = jQuery(this),
                    settings = $this.data('emodal');
    
                jQuery('iframe', $this).filter('[src*="youtube"],[src*="vimeo"]').each(function () {
                    var src = jQuery(this).attr('src');
                    jQuery(this).attr('src', '').attr('src', src);
                });
            });
    });

    I made some changes and added some test code to see whats going on. I tried to duplicate your issue but was unable to.

    Thread Starter s4s

    (@s4s)

    I replaced that code per your instructions. Neither of the modals load now.

    Plugin Author Daniel Iser

    (@danieliser)

    Would it be possible for you to email me temporary admin credentials so that I can test. I tried duplicating the issue on my servers but couldn’t. May be a conflict with some other plugin or just a edge case type bug but without ability to test and find issue it’s hard to get it fixed. Email me directly.

    danieliser at wizardinternetsolutions.com

    Thread Starter s4s

    (@s4s)

    Closing this issue, and wrapping it up for anyone who stumbles upon this problem.

    Daniel is awesome: he spent serious time in my Admin reviewing for conflicts and discovered that there is a jquery command hardcoded in my theme that causes plugins to load secondary scripts rather than running them through wp_enqueue_script / _style.

    He patched up the script functions in Easy Modal and will incorporate that fix in global updates in case anyone else has a similar issue.

    Many thanks, Daniel, for your help here and for your excellent product.

    When can we expect the patch? I’m having the same issue with modals not closing on my site, would love to get this fixed ASAP. Thanks in advance Daniel!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘modal won't close / close button not working’ is closed to new replies.