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

Update navigation bar reference during window resize #86

Closed
gsi-kevincarrera opened this issue Dec 27, 2023 · 5 comments
Closed

Update navigation bar reference during window resize #86

gsi-kevincarrera opened this issue Dec 27, 2023 · 5 comments
Labels
question Further information is requested

Comments

@gsi-kevincarrera
Copy link
Contributor

gsi-kevincarrera commented Dec 27, 2023

This issue pertains to the navigation bar’s unordered list (ul) reference not being updated in the code when the window size is reduced and the view switches to mobile.

Currently, the ul reference of the navigation bar is stored when the page is loaded. However, when the window size is decreased and the view changes to mobile, this ul reference is not updated in the code. This could lead to inconsistencies in the navigation bar’s behavior and appearance between desktop and mobile views. Solving this would help to solve another open issue, about trapping the focus on mobile view

@gsi-kevincarrera gsi-kevincarrera changed the title Update Navigation Bar Reference During Window Resize Update navigation bar reference during window resize Dec 27, 2023
@gsi-kevincarrera
Copy link
Contributor Author

Just figured out, maybe it is not a good idea to update the same mainMenu instance, but create another set of functions, with another event listener if needed, to manage mobile view. A feedback will be great in order to choose a path

@markteekman
Copy link
Owner

Hey @gsi-kevincarrera, thanks for taking the time to submit this issue! I'll take a look at it when I've got the time to verify what's happening and I'll get back to you then!

@markteekman
Copy link
Owner

@gsi-kevincarrera I don't know whether it matters that the ul reference isn't updated on resize, since the menu doesn't dynamically change? If the menu would have an extra item on another page it would require a page reload and set a new reference. Or did you mean something else?

@markteekman markteekman added the question Further information is requested label Jan 10, 2024
@gsi-kevincarrera
Copy link
Contributor Author

Opened this issue, due to some inconvinients, when working on the 'mobile menu traps focus' issue. But I figured out a way, as you can see in the PR, I think this issue can be closed

@markteekman
Copy link
Owner

Ah, I understand! Alright, I'll close this one up. Thanks!

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

No branches or pull requests

2 participants