-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
6.6: changed behaviour on pressing Enter on a selected block #65274
Comments
cc @stokesman |
This comment has been minimized.
This comment has been minimized.
This could be related to the This was mentioned in dev note as well. |
Yes, it definitely started from 6.6, and is connected to onSplit deprecation. But it seems like we can't re-create the behaviour we had before 6.6? We want the block to support splitting, but we also want to create a new empty Text block when we hit Enter at the end of it. It looks like creating an empty paragraph is the default now , right? It's also mentioned that onSplit should continue to work, but seems like it's not the case any more. Is there any alternative to onSplit? |
I tried to implement a block that I need to split off into a new heading today, and encountered the raft of issues you've found here. However, none of that is what actually got implemented. As far as I can tell, the final functionality is currently remarkably buggy (#64071, #64771) and the actual outcome appears to be improperly dependent on metadata properties. In addition, support for onSplit was completely removed in direct contradiction to the PR comment you referenced. This is, of course, also in direct contradiction to the documentation on WordPress' own website. |
Yes, set
No, the default is whatever is configured as the default block. See https://developer.wordpress.org/block-editor/reference-guides/packages/packages-blocks/#setdefaultblockname Let me know if something doesn't work, maybe with minimal block registration code to reproduce. |
I was just testing this out with a block I’m developing and concur. |
Also the reason |
Description
Hi everyone!
We noticed that hitting Enter on our custom blocks inserts an empty paragraph since the
6.6.26.6 update. Before6.6.26.6 it was inserting a copy of the same block.We suspect that this has something to do with that fix: https://github.com/WordPress/gutenberg/pull/64992/filesThe block in question: https://github.com/maxi-blocks/maxi-blocks/tree/master/src/blocks/text-maxi
Can you advise something, please? Maybe we can make some changes to revert it without rolling back to 6.5.5? Something for splitting the block, possibly?
Note: Adding support for "splitting": doesn't help.
Thanks!
Step-by-step reproduction instructions
Or check the videos below.
Screenshots, screen recording, code snippet
Before 6.6:
screencast-maxiblocks.com-2024.09.12-12_54_32.webm
On 6.6.2:
screencast-wordpress.local-2024.09.12-13_23_08.1.webm
Environment info
WordPress 6.6.2
PHP 8.3
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: