-
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
Navigation and Mini Cart blocks conflict #35768
Comments
Mini cart is not a WordPress core or Gutenberg block, so you would need to contact the developer of that block. |
Seems like a legit issue. This is where the nav block is overriding gutenberg/packages/block-library/src/navigation/view.js Lines 92 to 97 in ff468f2
It could as you say use |
I wasn't trying to say that it was not a legit issue, but that more information about which "mini cart" block is used.
|
I didn't say you weren't trying to say it wasn't a legit issue 😄 You're right, better testing instructions would be good 👍 Does look like a fairly easy code quality issue to fix that'll help the nav block to play nicely with plugins. |
Sorry @carolinan I will give you more information next time. Thank you. |
It is something easy case so I didn't think we need something more explanation. |
Mini Cart is Woocommerce block, so I will remember it is not recognized block for Gutenberg. |
That's what I figured, but there is more than one with that name 😄 |
Description
Describe the bug
The Mini Cart and Navigation blocks are using
window.onload
event, first for lazy load scripts, second one for init some MicroModal. So if I use these blocks on same page, only work the second rendered block action. In my case I havethis and mini cart is not working.
After some research.
I replaced
window.onload
towindow.addEventListener('load',function(){})
Using this method ensures that the handler is additive and does not replace existing handlers.
And the 2 blocks works properly.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: