-
AuthorPosts
-
August 2, 2022 at 2:22 pm #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
TiaAugust 3, 2022 at 7:16 am #1360416Hey 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,
IsmaelAugust 3, 2022 at 7:22 am #1360418by 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.
August 3, 2022 at 9:43 am #1360442August 3, 2022 at 12:18 pm #1360473Thank you very much Ismael. This works and I have learned something new again!
Great support.Kind regards
Tia
-
AuthorPosts
- The topic ‘pop-up jumps to the top of the page on mobile’ is closed to new replies.
