Open nkyimas-epignosis opened 1 year ago
I came across the same issue. I'm using a RichText in a Modal that is launched from a Gutenberg plugin. Basically the toolbar is always rendered in the block editor. It would be nice that it follows the container in which the RichText is rendered.
Btw have you tried adding the inlineToolbar prop?
@dmitrijCraq Adding the inlineToolbar
prop hides the text formatting options so I couldn't test if there is any difference regarding the Popover position.
@nkyimas-epignosis take a look a this issue https://github.com/WordPress/gutenberg/issues/46906. I think that the issue I've mentioned is related to your same problem. This affects all the popovers coming from the Toolbar. The guy said he resolved by using the components SlotFillProvider, Slot, Fill however I've have no idea on how to use them.
The RickText for what I've read is not meant to be used in the InspectorControls, howver In my personal opinion it would be nice to use it everywhere we need.
The SlotFillProvider
solution is likely to work in this case as well. Can someone confirm that it works so we can close this issue?
Thanks, @mirka for the heads up!
I tried the solution you mentioned but when is wrapped inside <InspectorControls>
the controls keep rendering outside the settings sidebar...
I think <InspectorControls>
is already wrapped with <SlotFillProvider>
is there any connection with this?
Hi guys any news about this?
Description
When of highlight or link settings are getting the wrong position and are partially hidden below
<RichText>
is used inside<InspectorControls>
then the<InspectorControls>
sidebar. It seems that it is getting the position from the RichText instead of the block toolbar.Step-by-step reproduction instructions
<RichText />
inside<InspectorControls />
Screenshots, screen recording, code snippet
https://github.com/WordPress/gutenberg/assets/117932205/fc312174-cd47-4212-9672-0cbc7478a02f
Environment info
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