Skip to content
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

Fixed #326: WP 5.7 - Drawer & Modal blocks can't be properly selected in the editor #332

Conversation

sksaju
Copy link
Member

@sksaju sksaju commented Mar 28, 2023

This PR fixes the issue: #328

I've modified the allowedBlocks component file to return const variable instead of a callable function to fix this issue as
<InnerBlocks allowedBlocks={ allowedBlocks() } /> was causing the issue and didn't work with the function.

@acketon
Copy link
Member

acketon commented Mar 28, 2023

The selecting of the block is more reliable but the allowed blocks list is not functioning properly and is only allowing these 2 blocks to be inserted for me:
image

@acketon
Copy link
Member

acketon commented Mar 28, 2023

The selecting of the block is more reliable but the allowed blocks list is not functioning properly and is only allowing these 2 blocks to be inserted for me: image

I'm guessing getBlockTypes() is running too soon and only some of the blocks have been registered so I'm only seeing those 2 blocks. If I run wp.blocks.getBlockTypes() in the console once the editor has loaded then I get a list of about 63 blocks.

@sksaju
Copy link
Member Author

sksaju commented Mar 28, 2023

Yeah, you are right, using allowedBlocks function resolves the available block list issue but again arise the selectable issue, trying to find an alternative way..

@acketon
Copy link
Member

acketon commented Jun 7, 2024

this was fixed by upgrading the block to Block API 2 I believe. Closing for now.

@acketon acketon closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants