AdvancedCustomFields / AdvancedCustomFields/acf
Text cursor jumps to ACF WYSIWYG field upon hitting enter key
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When editing a page with Gutenberg that contains ACF blocks with a WYSIWYG field the cursor jumps to the last WYSIWYG field on the page.
To Reproduce
Steps to reproduce the behavior:
- Edit or create a page
- Add an ACF Block that contains a WYSIWYG field with default settings
- Switch ACF Block to Edit view
- Now click the title or a Gutenberg paragraph and hit the Enter key
- Cursor jumps to the last ACF WYSIWYG field on the page (that is in Edit mode)
Expected behavior
The text cursor should just create a new paragraph instead of jumping to the ACF WYSIWYG field.
Screenshots or Video
https://github.com/user-attachments/assets/6e8ff233-3d42-4d74-835d-b702d169165d
Version Information:
- WordPress Version: 6.7.1
- PHP Version: 7.4
- ACF Version: ACF PRO 6.3.12
- Browser: Chrome
Additional context
I already did some digging. I think it has something to do with TinyMCE because when I enable Delay Initialization (TinyMCE will not be initialized until field is clicked) the cursor doesn't jump to the WYSIWYG field.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a Gutenberg page containing an ACF block with a WYSIWYG field, following the listed steps. Compare the cursor behavior with TinyMCE Delay Initialization enabled and disabled. Done means pressing Enter in the title or a Gutenberg paragraph creates a new paragraph without moving focus to the last WYSIWYG field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100