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

Menu triggered by hamburger not sticky #27

Open
charlesroper opened this issue Feb 21, 2021 · 4 comments
Open

Menu triggered by hamburger not sticky #27

charlesroper opened this issue Feb 21, 2021 · 4 comments

Comments

@charlesroper
Copy link

Describe the bug
In my mobile browsers (tried Firefox and Edge on Android) the vertical menu that appears when tapping the hamburger is anchored to the top rather than sticking to the viewport. This is really confusing when scrolled down the page because it seems as if the hamburger does nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page on mobile
  2. Tap on hamburger menu
  3. Scroll down the page
  4. See error

Expected behavior
Menus should stick to viewport

Screenshots
Screenshot_20210221-214110

@broeker
Copy link
Owner

broeker commented Feb 22, 2021

Thanks @charlesroper, yeah, that has bugged me a bit also. What do you think of this approach?

https://nextra.vercel.app/

That's kind of what I had in mind, but I think your idea is different. In their case, they made the decision to have the menu open (full screen), or not open at all, with no ability to scroll at all if it is open.

@charlesroper
Copy link
Author

That looks like a great approach - very happy with that. 👍

@arrowtype
Copy link

Considering suggesting Spacebook for some docs – it looks like a super nice 11ty starter for docs! But, this issue is somewhat of a blocker... for what it's worth, my opinion is that a menu is nice to have open while scrolling/reading on large viewports, but it's fine for it to block content on smaller viewports. If I had to express a preference for small-screen menu UX, it would probably be to leave a bit of the page showing, and for a tap outside the menu to close it. This helps show context, makes it simple to close, and helps prevent scrolling behind it (which can be awkward for users).

I've wrangled with CSS to do somewhat similar things, so I could probably point to some useful CSS-Tricks posts on it, if that would be helpful.

@mjhoefer
Copy link

Is this currently on anyone's radar? Or have some direction for what it would take to implement? @arrowtype I'm in agreement with your preferences.

Opening the menu once scrolled down also requires scrolling up to view the menu.

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

No branches or pull requests

4 participants