Mini Modal: Two Clicks to Close

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afiumano
    Mighty Mivite




    • Dec 2010
    • 765

    #1

    Mini Modal: Two Clicks to Close

    I am using a modal to pull up a webpage. Here is how I am calling up the modal:

    <a class="delivery" data-mini-modal data-mini-modal-type="ajax" href="delivery-options.html">

    When I click the 'X' button it doesn't close the modal window - it shows a right hand scroll bar - see screen shot. Once I hit the 'X' button a second time - then it will close. Any ideas why that might be happening?
    You do not have permission to view this gallery.
    This gallery has 1 photos.
  • afiumano
    Mighty Mivite




    • Dec 2010
    • 765

    #2
    I figured this out - my product image modals were doing the same thing. I had added the following code for the mini-modal to my themes.js but once I removed it, everything is working fine again and the modal is still working.


    var targets = document.querySelectorAll('[data-mini-modal]');
    for (var i = 0; i < targets.length; i += 1) {
    var modal = minimodal(targets[i], {
    // options
    statusTimeout: 600,
    removeTimeout: 600,
    closeTimeout: 600
    });
    modal.init();
    }

    Comment

    Working...
    X