-
Alexis
Hello there,
It’s all in the title. I’m currently experiencing a problem on one of the sites I manage, which I’ve never experienced before with GeneratePress.
1) The problem appears exclusively on mobile devices, or on a web browser whose window is reduced to less than 768px.
2) When the off-Canva/Slideout menu is opened and then closed without clicking on a link, it is no longer possible to scroll within the page. This is really ennoying.
3) In the meantime on desktop, slideout / off-Canva menu make scrolling in page on the background
I don’t understand what could be causing this. I’ve disabled quite a few of the functions/plugins I use (I don’t have many; most of the functions are in code) to find a possible incompatibility, but that hasn’t changed anything.
Any idea would be welcome. Thanks in advance !
-
Alvind
Hi there,
Upon inspecting, you have the following CSS in your child theme’s
style.cssfile, which is causing the issue:/** HORS MEDIA QUERY **/ .mobile-menu-open, .mobile-menu-open body { overflow: hidden !important; } -
Alexis
Hello Alvind,
Thank you so much for your quick response !
This did indeed resolve the issue, which is a good thing. However, I had actually found this code here, after research on Generate support, via a response from David I think (one of them here, but there is other similar subjects), which made it possible to prevent scrolling within the page when opening the menu. Now, when you scroll down with the menu open, the page scrolls along with the menu, which is a bit odd.
Is there a way to prevent this unwanted scrolling without recreating the original problem ? Could it be the mobile menu type ? I chose the overlay menu and not the slide-in menu because I wanted a 100% width background and a centered layout on mobile and left-aligned on desktop with an element that I added on computer and tablet with the after_slideout-menu hook. This mode seemed to me the easiest way to achieve this, but maybe he is the cause of this problem ?
-
Change the CSS to:
.slide-opened, .slide-opened body { overflow: hidden !important; }Let me know if this helps!
- You must be logged in to reply to this topic.