Tagged: magnificantpopup, Modal
-
AuthorPosts
-
February 7, 2023 at 11:55 am #1396972
I have a modal working thanks to:
and
However, on mobile, the page scrolls to the top when a modal is opened. This means the modal is lost to the user, unless they realise and scroll down. I have tried a suggested fix:
https://github.com/dimsemenov/Magnific-Popup/issues/782#issuecomment-472645597
But it stops the modal from working at all.How can I:
a.) Prevent the scrolling, or
b.) Limit the (body?) overflow while the modal is openThanks in advance.
February 8, 2023 at 5:34 am #1397083Hey elsmore01,
Thank you for the inquiry.
Where can we check the issue? Please provide site details in the private field and a screenshot will also help.
Best regards,
IsmaelFebruary 8, 2023 at 2:43 pm #1397180Hi Ismael,
Thanks for your reply. Notes in private content.-
This reply was modified 2 years, 9 months ago by
elsmore01.
February 9, 2023 at 3:29 am #1397252Hi,
Thank you for the inquiry.
In the popup script, please try to add this line after the magnificPopup function.
$('.iframe-popup-link').find('a').addClass('no-scroll');The following threads might help.
// https://kriesi.at/support/topic/inline-popup-enabler-not-working/#post-1371471
// https://kriesi.at/support/topic/pop-up-jumps-to-the-top-of-the-page-on-mobile/#post-1360416Best regards,
IsmaelFebruary 13, 2023 at 11:47 am #1397729Thanks, Ismael.
A slightly modified version worked for me – basically just adding the ‘fixedContentPos: true’ line:
jQuery(window).on('load', function(){ jQuery('.open-popup-link a').magnificPopup({ type:'inline', midClick: true, fixedContentPos: true }); });February 13, 2023 at 1:13 pm #1397739Hi,
Glad to hear that you have this sorted out, and thanks for sharing your solution, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
This reply was modified 2 years, 9 months ago by
-
AuthorPosts
- The topic ‘Page scrolling with popup’ is closed to new replies.
