AdvancedCustomFields / acf

Advanced Custom Fields
http://advancedcustomfields.com/
823 stars 168 forks source link

Inability to Edit WYSIWYG Field in Sidebar While Using Block Editor #876

Open matthiashonert opened 9 months ago

matthiashonert commented 9 months ago

Describe the bug If I first work in the main area (block editor) of a post and then try to further fill the WYSIWYG editor with content, I can no longer select the WYSIWYG editor with the cursor. The click is ignored. But if I didn't select content in the block editor with the cursor before (directly to the WYSIWYG editor in the sidebar), then I can select the editor and enter text. But as soon as I select again with the cursor text in the block editor, the WYSIWYG field does not work again - I can not click into it.

To Reproduce Steps to reproduce the behavior:

  1. Create a WYSIWYG field
  2. Position this field on side
  3. Open the post and select Text in the main area
  4. Try to click in the WYSIWYG field, field is not selected, text cannot be written

Expected behavior I want to edit text within the Block Editor and then insert more text into the WYSIWYG in the Sidebar. Then back to the main area to continue working and maybe again to the sidebar to the field.

Screenshots or Video If applicable, add screenshots or video to help explain your problem.

Version Information:

https://github.com/AdvancedCustomFields/acf/assets/13810102/e6feb5b8-50b2-4056-925e-282a8762598e

lgladdy commented 9 months ago

Hey @matthiashonert,

Thanks for the report here. We don't recommend using the WYSIWYG field in the block editor as it has a lot of quirks like this where Gutenberg events are overriding the jQuery events that TinyMCE is using. Instead, we'd recommend using <InnerBlocks /> inside your ACF Block to support native WordPress blocks to act as the WYSIWYG.

We'll still take a look at trying to fix this though, but we're becoming increasingly restricted in the things we can do with the legacy jQuery libraries inside the block editor.

freinbichler commented 3 weeks ago

Adding my +1 here, it seems to only happen in Safari for me, and only in WYSIWYG fields defined on the post or page itself, not in fields of ACF blocks.

phillubliner commented 2 weeks ago

+2, exact same scenario. On page load/reload you can edit the fields, but as soon as you even select a block and go back to the sidebar to edit an ACF WYSIWYG field, you can't edit. This might have started after we moved block registration to the new recommended JSON method. Hadn't noticed it previously.