-
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
Plugin: Navigation menu doesn't appear when hamburger clicked on #45773
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Windows, LGTM.
I haven't tested this myself yet. Does this solution work when Gutenberg is symlinked from a different folder? |
@bobbingwide If the problem occurs when the Gutenberg project is symlinked, then it would be a good idea to submit a new issue. |
Fixed reopened #33273
What?
This PR fixes a problem with the Gutenberg plugin enabled in a Windows environment where the modal doesn't appear when the navigation hamburger is clicked.
Why?
This problem is caused by /lib/compat/wordpress-6.1/blocks.php for backward compatibility.
My understanding is that the
gutenberg_block_type_metadata_view_script
function exists to load multipleviewScripts
in the old WordPress version. And in the navigation block,view.min.js
andview-modal.min.js
, are specified asviewScripts
.In this function, the forward slash and backslash are mixed as path delimiters, which causes the problem that
view-modal.min.js
in the above script is not loaded.@bobbingwide's analysis of this issue in this comment may also be helpful.
How?
Within this function, all path delimiters have been unified into forward slashes.
I will explain the details in turn in the comments that follow.
Testing Instructions
view.min.js
andview-modal.min.js
are loaded.Screenshots or screencast