-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no_scroll: true not working on mobile #4
Comments
You're right looks like my scroll disable script doesn't support touch devices @generatepress .. I'll update and close the issue once I test it! Thanks for point it out 👍 |
Awesome, thanks! |
Ok It's updated and tested on nexus 5 and iphone 6 .. the scroll flag should be working on mobile now. You can test it out here I'm gonna close this issue for now but just let me know if you run into any related issues or open a new one if it's unrelated 😄 @generatepress |
Looks like it's working - thanks! :) However, my slide out content is longer than the initial viewport on mobile, so I had to add overflow: auto to it. This update made it so I can't scroll within my slide out content on mobile either - seems to have disabled mobile scrolling altogether instead of just within the body content. |
Yeah the listener that prevents scroll is attached to the body so it applies to all elements. Can you send me a fiddle or a live page that you're working with? I have an idea I can try out as a quick fix. the plugin wasn't really designed for large pieces of content that's why I never considered that case but I could potentially have a quick fix for it @generatepress |
Maybe this will help: http://codepen.io/anon/pen/rOqyNd Basically it would be great if we were able to scroll inside the slideout element. Some mobile phones don't have a lot of visible room, so scrolling can be necessary to see all links or content. Thanks! :) |
Ok I see, the disable scroll function is pure javascript so it attaches to window. Try dropping my no_scroll functionality and using this instead https://github.com/ultrapasty/jquery-disablescroll I'll try porting over my code to jQuery that will probably help with but I think it'll take time for me to do it and test it on a bunch of browsers so in the mean time give that plugin above a shot, I think it can solve your problem @generatepress |
I found the best way to do this is to add a class to the body element when the slider is opened. Then just add some simple CSS:
|
I noticed that the no_scroll: true parameter isn't working on mobile devices.
Also, you may want to add overflow: auto to the slideout menu area to enable scrolling if the menu items reach below the initial viewport.
On Chrome, when you scroll down (as it allows you to scroll), the URL area disappears and leaves a gap below the slideout menu the same height as the URL area was. This will probably be fixed when the no_scroll thing is fixed.
Let me know if you need more info - great script! :)
The text was updated successfully, but these errors were encountered: