-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Responsive navigation: menu does not appear when hamburger clicked on #33273
Comments
The problem occurs in my Windows development machine.
This is defined in
|
It's a problem with Windows directory separators in
Disabling the test, the enqueued script is
|
Possible fixChange Also wrap
This should resolve the problem with the hamburger menu not appearing and |
cc @jasmussen as a heads up in case you can replicate this/have more context! |
Thank you for the ping Anne. @vcanales does this ring any bells? |
This happens because TT1-blocks loads scripts before the body in the DOM, which means that when the responsive menu initialization was ran, it couldn't find any menus. Fixed here. This does bring up an interesting question about lazy loading; it would be necessary to load any lazily loaded menus in this manner as well. Something to keep in mind for the future. |
Something else to note is that the error may have been caused by failures to load the file in earlier versions, but that has been handled. |
I can confirm I'm seeing the same issue in a Windows environment. I didn't realise there was supposed to be a front-end script for the navigation toggle, so my theme has been supplying its own solution. Testing now in a Linux environment, I see WordPress 5.8.1 |
I've got the same symptoms again with WordPress 6.1 and Gutenberg 14.4.0 & 14.5.0. |
Reopening isse as @bobbingwide Herb reported that the problem has showed up again in Gutenberg 14.5.0 and WordPress 6.1 in a Windows environment. |
Problem reproduced today with TwentyTwenty-Three. |
I have identified the cause of the problem. |
@t-hamano thanks for the confirmation. I've proposed a new fix in bobbingwide/written#19 (comment) |
@bobbingwide |
Thanks for looking into this! I'll be around to review :) |
The PR #45773 is ready. If you can test this PR in a Windows environment, I would be glad to have you review it. |
Closed by #45773 |
Description
In Gutenberg 11.0.0 the ability to view the navigation menu when it's reduced to a hamburger menu has disappeared.
It worked in 10.9.1.
It appears that the front end script is not being loaded in 11.0.0
Step-by-step reproduction instructions
OR add a new Horizontal navigation menu and set Enable responsive menu toggle to on.
Expected behaviour
Menu appears when hamburger clicks.
Actual behaviour
Menu doesn't appear.
Screenshots or screen recording (optional)
Display during step 2.
![image](https://user-images.githubusercontent.com/2474435/124871118-9238b380-dfbb-11eb-87ff-36943fa06cf6.png)
Hamburgers appears.
![image](https://user-images.githubusercontent.com/2474435/124871255-b98f8080-dfbb-11eb-97ea-0d7715520bf7.png)
With 11.0.0 you can't get any further.
Expected result - with 10.9.1
![image](https://user-images.githubusercontent.com/2474435/124871414-ecd20f80-dfbb-11eb-88dd-07c0aa72c0eb.png)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: