-
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
Popover.Slot
breaks template editor
#57142
Comments
@Sidsector9 Could you share the error message? |
@talldan , I've updated the issue with the error message. |
@Sidsector9 It's a weird error, for sure! I think the reason it happens is that the 'more options' menu expects to render in the default editor I'm not sure if there's a way we can fix it internally, but there are some options for you that should resolve the issue. You can either remove <Popover.Slot name="my-popover-slot" />
<Popover __unstableSlotName="my-popover-slot">
Popover example text
</Popover> That effectively differentiates your popover from the one the block editor uses for it's UI. Unfortunately the prop on @ellatrix may also be interested in this one. |
Agree with @talldan 's reply. Also flagging this related conversation: |
Thanks for responding @talldan.
Unfortunately this is not an option in the plugin I'm working on, as As you suggested, I tried making use of the |
So you definitely set |
You're correct, I set |
Closing as the issue seems resolved. Feel free to re-open if necessary |
Description
As the title suggests, use of
Popover.Slot
breaks inside the template editor, however works when used in Page/Post editor.Step-by-step reproduction instructions
npx @wordpress/create-block@latest --wp-scripts --namespace popoveryolo
to create a blockedit.js
with the following:Screenshots, screen recording, code snippet
Screen-2023-12-17-234803.mp4
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: