Skip to content
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

Fix ios mobile menu scroll #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hopeful2
Copy link

@hopeful2 hopeful2 commented Sep 28, 2018

Thanks for making this theme as a live tutorial of the latest Hugo features. It is awesome.

Currently the mobile menu does not scroll on some older ios devices such as iPhone 6 running IOS 11.4. It is extremely difficult or not even possible to access some menu items on small screens using mobile Safari. This causes usability issues. There are also challenges to access the docs menu items using Chrome on iPhone 6. The issues may also exist on newer models.

This PR introduces a tiny (about 1kb) js library to disable body scrolling when the mobile menu is open, so that only the mobile menu can scroll. Some minor changes are required on partials/nav-mobile.html to enable menu scrolling.

I have tested on iPhone 6 using Safari and Chrome, and the mobile menu scrolled quite well, both in portrait view and landscape view. It should work on even older devices.

Please review and consider the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant