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

Cannot add a block into an empty core/group flex layout with one member in allowedBlocks #56438

Closed
wongjn opened this issue Nov 22, 2023 · 9 comments · Fixed by #61585
Closed
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended

Comments

@wongjn
Copy link

wongjn commented Nov 22, 2023

Description

For core/group block that:

  • Has the layout attribute value of {"type":"flex"}, i.e. a Row or Column variation.
  • Has no inner blocks.
  • Has a single value in its allowedBlocks attribute.

One cannot click on the button appender component to insert a block.


This seems to stem from the following CSS rule in dist/block-library/editor.min.css:

.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child {
  gap: inherit;
  pointer-events: none;
}

Which seems to come from:

Step-by-step reproduction instructions

  1. Install and activate a core block theme, i.e. Twenty Twenty-Four.
  2. Create a new Page.
  3. Paste the group code provided further below.
  4. In visual mode, attempt to click on the block appender button. Observe that no response is given.

Screenshots, screen recording, code snippet

Sample code:

<!-- wp:group {"allowedBlocks":["core/paragraph"],"layout":{"type":"flex"}} -->
<div class="wp-block-group"></div>
<!-- /wp:group -->

Screencast:

issue.mp4

Environment info

  • WordPress 6.4.1 with Twenty Twenty-Four theme
  • Chrome 119.0.6045.160
  • Desktop Windows 11

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

@wongjn wongjn added the [Type] Bug An existing feature does not function as intended label Nov 22, 2023
@jordesign jordesign added Needs Testing Needs further testing to be confirmed. [Block] Group Affects the Group Block (and row, stack and grid variants) labels Nov 22, 2023
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Dec 23, 2023
@wongjn
Copy link
Author

wongjn commented Dec 23, 2023

Confirming the problem still exists

@github-actions github-actions bot removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Dec 24, 2023
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 23, 2024
@wongjn
Copy link
Author

wongjn commented Jan 23, 2024

Confirming the problem still exists.

@github-actions github-actions bot removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 24, 2024
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Feb 24, 2024
@wongjn
Copy link
Author

wongjn commented Mar 11, 2024

Confirming the problem still exists.

@talldan talldan removed Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. labels May 9, 2024
@talldan talldan moved this to ❓ Triage in WordPress 6.6 Editor Tasks May 9, 2024
@talldan
Copy link
Contributor

talldan commented May 9, 2024

Thanks for reporting it and keeping the issue open. I can reproduce too. I think it might be a good thing to consider fixing for WordPress 6.6, so I've added it to the project board.

@talldan
Copy link
Contributor

talldan commented May 9, 2024

The fix might just be adding the .block-list-appender classname to this selector:

.block-editor-inserter {
pointer-events: all;
}

@talldan talldan added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label May 9, 2024
@vipul0425
Copy link
Contributor

Hi @talldan, Raised a PR to fix this issue.

Thanks.

@github-project-automation github-project-automation bot moved this from ❓ Triage to ✅ Done in WordPress 6.6 Editor Tasks May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants