Tagged: Mangific Popup
If you go to this page here, and click on Send us your brief button on the bottom. The window scrolls to the top and then there lies the form why is that? Shouldn’t the form open then and there.
can you try to put this into your child-theme functions.php:
add_filter( 'avf_default_lightbox_no_scroll', '__return_true' );
Works well, thanks so much!
Just for my info, your theme also makes the same thing in desktop, why is that?
Like when I open the modal, it opens the modal but take me to top too, any particular reason?
That snippet should handle both – if you do not see it – refresh all cachings / merged files – and browser cache too.
if that does not work – we had to give a custom-class to the anchor link itself: no-scroll
but to be more selective a custom class on those parent container would be helpfull.
But before testing: How did you initialize the modal opening of the hidden section?
Edit : aha – i see …
what kind of php version is installed? because if php 8.x. (comes with jQuery 3.x ) look to your inline popup script and replace those deprecated functions. – f.e:
jQuery(window).load(function() {
//replace with:
jQuery(window).on('load', function(){
under that line add :
jQuery('.conditional_popup_link a, .popup_link a, .inline_popup, .avia-buttonrow-center.spaced-between a[href^="#"]').addClass('no-scroll');
Adding no-scroll works. Thanks a lot!
I was also thinking the filter should work for both, but oh well!