Open westwick opened 10 years ago
After some more google searching I found this: http://stackoverflow.com/questions/21592433/jpanelmenu-and-scrolling-not-working-together
I altered the setjPanelMenuStyles function to change the overflow-x to visible and it indeed solved my problem. However I'm not 100% what all this could be affecting and I assume there is a reason it is being set this way, even though it seems to function perfectly without it. Any thoughts?
As a side note, I also had problems with my fixed position elements being screwed up after calling jPM.on(), and by simply commenting out the entire checkFixedChildren function, I no longer have the problem and the functionality is still there for me. Would love to hear any thoughts on that as well!
Without overflow-x:hidden you'll get a horizontal scrollbar on your mobile layout when the nav is open surely?
You are right, don't know how I didn't notice that.
The real problem is complex, summarised here: http://www.brunildo.org/test/Overflowxy2.html ... Basically using different values of overflow-x and overflow-y can have unexpected results. I've hacked around this just now by adding body{overflow-x:visible!important} - this leaves the jPanelMenu's overflow-x:hidden style intact.
I have this small function working fine:
... but as soon as I call jPM.on(), it no longer works. Is this because it's placing all the page content inside the jPanelMenu-panel class, and the window is no longer scrolling but rather just the content inside the jPanelMenu-panel class? If so, what is the best to handle/detect how far down a user has scrolled? It seems I can't use $('.jPanelMenu-panel).scroll(...) or .scrollTop(), etc.