• Hi,

    I’ve discovered a bug where if you :

    1. Create a metabox and use the <details> tag to create a toggle-able section of your metabox
    2. In the block editor, collapse the metabox or try to drag-move it

    The page crashes/freezes. Has anyone else had this same problem? I’ve had to remove the <details> elements from my metabox for now because of this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Create a metabox and use the <details> tag to create a toggle-able section of your metabox

    Are you using some plugin for this? Or are you writing custom code to create the meta boxes?

    Thread Starter Dylan Houlihan

    (@dylanhoulihan)

    Hey @gappiah I’m using custom code to create the meta box.

    Edit: For example, the HTML code for the metabox might look like this:

    <div class="metabox-container"><details>
      <summary>Additional Metabox Data</summary>
        <div class="data-fields">
          <div class="meta-options">
            <label for="some_id">Some ID</label>
            <input id="some_id" name="some_id" value="123">
          </div>
        </div>
    </details></div>

    With this, trying to drag move or collapse the meta box would cause a memory limit crash for some reason. Oddly enough, if the meta box is already collapsed (e.g. after reloading the page due to it crashing from collapsing it), I can extend it and then re-collapse it as many times as I want without issue.

    The crash only happens when either trying to drag the metabox to a new position, or when trying to collapse it when it’s loaded in as already open.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug when using the [details] html tag within a metabox’ is closed to new replies.