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 is not closing for one-page site #460

Closed
AntoineSoetewey opened this issue Jan 29, 2023 · 1 comment · Fixed by #705
Closed

Menu is not closing for one-page site #460

AntoineSoetewey opened this issue Jan 29, 2023 · 1 comment · Fixed by #705
Labels
bug Something isn't working

Comments

@AntoineSoetewey
Copy link
Contributor

AntoineSoetewey commented Jan 29, 2023

What happened?

Hello,

my website www.datanalyze.be is a one-page site in the sense that links in the menu redirects to a section of the home page.

I noticed that when I click on a link in the menu, it correctly redirects to the section but the menu stays open (and we have to click on the cross to close it).

See in practice:

IMG_2864.MOV

Would it be possible to implement the fact that the menu closes automatically after clicking on a link?

In case it helps, the repo is available at:

https://github.com/AntoineSoetewey/datanalyze

Thanks in advance!

Theme version

v2.5.2

Hugo version

v0.101.0

What browsers are you seeing the problem on?

Chrome, Safari

Relevant Hugo log output

No response

@AntoineSoetewey AntoineSoetewey added the bug Something isn't working label Jan 29, 2023
@jpanther
Copy link
Owner

jpanther commented Feb 5, 2023

Thanks for raising this issue. I suppose this is an unusual one as this is kind of an edge case in the way the menu would normally be used. I agree that the UX for the way this works now is really not great, but I'm also not sure how best to address it.

If I were to make the menu close whenever a link is clicked, it will lead to the behaviour where the user will always see the menu dismiss even when navigating to another page and there'll be this delay where you see the original page content flash up before the browser navigates to the new link. And that seems like a worse outcome given that's how the majority of menu links would be used.

I have to do some thinking on how best to address this without adding a bunch of extra JavaScript that makes the site less performant.

@jpanther jpanther added the wip Work in progress label Feb 24, 2023
@github-actions github-actions bot removed the wip Work in progress label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants