Skip to content

Wysiwyg editor in meta box below block editor breaks on some occasions #1031

Description

@wiegertschouten

Describe the bug
When I use the WYSIWYG editor field in a meta box that sits below the WordPress block editor, sometimes it appears also if there is no text. And if you look at the JavaScript console, it shows the volgende error message when I try to switch between the 'Visual' and 'Text' tabs:

Uncaught TypeError: Cannot read properties of null (reading 'setBaseAndExtent')
    at i (tinymce.min.js?ver=49110-20250317:2:291936)
    at Object.each (tinymce.min.js?ver=49110-20250317:2:1346)
    at Object.select (tinymce.min.js?ver=49110-20250317:2:293163)
    at _ (editor.min.js?ver=7.1:2:5063)
    at n (editor.min.js?ver=7.1:2:1731)
    at HTMLDocument.<anonymous> (editor.min.js?ver=7.1:2:248)
    at C (tinymce.min.js?ver=49110-20250317:2:10800)
    at HTMLDocument.d (tinymce.min.js?ver=49110-20250317:2:10946)

To Reproduce
Steps to reproduce the behavior:
Create a WYSIWYG field and add it to a metabox that sits below a block editor. Add some text to it, save it, and switch between text and visual modes. Reload the page. The text will be gone (sometimes, not always - that makes this bug tricky to reproduce).

Expected behavior
The text in the editor field should appear at all times.

Version Information:

  • WordPress Version: 7.1
  • PHP Version: 8.2.33
  • ACF Version: Pro 6.8.9
  • Browser: Chrome 152.0.7977.76

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions