Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1360312

    Hi
    I am linking Team images to Bio Pages that open in a pop-up using the suggested method shown here https://kriesi.at/support/topic/pop-up-with-iframe-loading-very-slowly/
    Everything works great on desktop but on mobile, the pop-up jumps to the top of the page (it is a one-page site with anchor menu links) so the user has to scroll down through the black pop-up background to see the pop-up, which they may not do.
    Is there some way to have the pop-up open at the current position rather than jumping to the top?

    I attach private data for the site in question.

    Many thanks
    Tia

    #1360416

    Hey Tia,

    Thank you for the inquiry.

    We updated the jQuery script a bit. Please try to replace the script tag content with the following code.

    
    jQuery(document).on('load', function(){
        jQuery('.avia-image-container.team-popup a.avia_image').addClass('team-popup-link');
        jQuery('.team-popup-link').addClass('no-scroll');
        jQuery('.team-popup-link').magnificPopup({
            type:'inline',
            midClick: true,
                fixedContentPos: true,
                overflowY: 'hidden'
        });
    });
    

    And according to a discussion, you can use this css code to completely prevent scrolling when the lightbox is open.

    .mfp-zoom-out-cur {
         width: 100%;
         position: fixed;
         overflow: auto;
    }
    
    .mfp-wrap {
         top: 0 !important;
    }
    

    Best regards,
    Ismael

    #1360418

    by the way: wouldn’t it be the best to have this no-scroll option as default value?
    From my point of view, jumping to the top position has no reasonable justification.

    Does that new filter : avf_default_lightbox_no_scroll work like this too!
    add_filter( 'avf_default_lightbox_no_scroll', '__return_true' );

    i do insert that to my child theme functions.php to have no scroll on both – the lighbox itself and the background.

    #1360442

    Hi,


    @Guenni007
    : I was not aware of that filter. Thank you for the info!

    Best regards,
    Ismael

    #1360473

    Thank you very much Ismael. This works and I have learned something new again!
    Great support.

    Kind regards

    Tia

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘pop-up jumps to the top of the page on mobile’ is closed to new replies.