Gutenberg editor focus jumps to nearest ACF block with a WYSIWYG when entering a new line #68905
Open
3 of 6 tasks
Labels
[Feature] Writing Flow
Block selection, navigation, splitting, merging, deletion...
[Type] Plugin Interoperability
Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Description
When editing content with the block editor that contains an ACF block with a WYSIWYG field, hitting the enter button to open a new line after a block jumps the cursor to the end of the WYSIWYG field rather than keeping focus on the new line.
Step-by-step reproduction instructions
In a fresh WP installation, install and enable ACF pro.
Register a block.
Within the theme, create a
blocks/text-block
directory and add this block.json:You can also add the
blocks/text-block/text-block.php
file, though it can be empty.Add a new ACF field group that has a single WYSIWYG field, and assign it to the block you created above.
Open a post that uses the block editor for editing. Add some text content, as well as an instance of your ACF block. Make sure the ACF block sits at least after two paragraphs.
Put your cursor at the end of the first text paragraph, then hit enter. Confirm that the editor creates a new empty text block but then immediately the cursor jumps to the end of the first instance of the ACF block's WYSIWYG editor rather than staying in the new empty block.
Manually click back to the previously opened block and hit the backspace button. Confirm that the block gets removed but again the cursor jumps to the end of the first instance of the ACF block's WYSIWYG editor rather than the end of the previous text block.
Screenshots, screen recording, code snippet
Google.Chrome.-.Edit.Page.Demo.page.Demo.bug.report.WordPress.2025-01-27.at.4.11.45.PM.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: