Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1484105

    Hi,
    – Is there a way to change the lightbox size? The picture is a bit small on mobile when it is horizontal.

    – Is it possible to block the scroll when the lightbox is open?

    Thanks!

    • This topic was modified 2 weeks, 6 days ago by spray.
    #1484127

    Hey Pierre,

    Thank you for the inquiry.

    You can add this filter to the functions.php file to adjust the thumbnail size used in the lightbox container.

    function avf_alb_lightbox_image_size_mod($size) {
      return "full";
    }
    add_filter('avf_alb_lightbox_image_size', 'avf_alb_lightbox_image_size_mod', 10, 1);

    To disable scrolling when lightbox is active, use this code in the Quick CSS field.

    .mfp-zoom-out-cur {
        height: 100vh;
        overflow: hidden;
    }
    
    .mfp-bg {
        height: 100vh !important;
    }

    Best regards,
    Ismael

    #1484140

    Hello,
    for the thumbnail size i managed it, thanks

    But for the scroll, it doesn’t work for me with you code.

    i put this instead and it seams to be OK:

    .mfp-wrap.mfp-gallery.mfp-close-btn-in.mfp-auto-cursor.avia-popup.mfp-zoom-in.mfp-ready {
    top: 0 !important;
    position:fixed!important;
    }

    What do you think about it?

    #1484195

    Hi,

    i put this instead and it seems to be OK:

    We tested it on our end but it didn’t work. Try to add this script in the functions.php file instead:

    add_action( 'wp_footer', 'av_custom_script_mod', 100 );
    function av_custom_script_mod() {
        ?>
        <script>
        jQuery(document).ready(function($) {
            $(document).on('click', '.lightbox-added', function () {
                setTimeout(function() {
                    if ($('body').hasClass('mfp-zoom-out-cur')) {
                        $('html').css('overflow', 'hidden');
                    }
                }, 100); 
            });
    
            $('.lightbox-added').on('mfpClose', function () {
                $('html').css('overflow', '');
            });
        });
        </script>
        <?php
    }
    
    

    Best regards,
    Ismael

    #1484210

    Hi,
    Your code doesn’t work on mobile but on laptop it’s fine because i dont see anymore the scroll bar.

    #1484280

    Hi,

    Have you tried switching to incognito mode or completely removing the browser history on your phone? Please provide the site URL in the private field so we can check it properly.

    Best regards,
    Ismael

    #1484377

    Hello,
    Sorry for the late answer
    By using your code and mine, it’s ok but if you can have a look of course i would appreciate!

    #1484426

    Hi,

    Thank you for the update. It seems to be working correctly when we checked.

    View post on imgur.com

    Best regards,
    Ismael

    #1484465

    Hello,
    Yes because i didn’t remove this in my css:

    .mfp-wrap.mfp-gallery.mfp-close-btn-in.mfp-auto-cursor.avia-popup.mfp-zoom-in.mfp-ready {
    top: 0 !important;
    position:fixed!important;
    }

    with just the code you send to me it seems that it doesn’t work on mobile (if i remove my Css)

    #1484473

    Hi,

    Feel free to keep the css if it works on your end. Let us know if you need anything else.

    Best regards,
    Ismael

    #1484589

    Hi,
    Ok, i will let it like this!

    Thanks for your help!

    Have a nice day!!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.