wpmetabox / meta-box

The best plugin for WordPress custom fields and custom meta boxes
https://metabox.io
1.19k stars 423 forks source link

Metabox group: wysiwyg does not display content after moving #1376

Closed SimonvanWijhe closed 1 year ago

SimonvanWijhe commented 4 years ago

Issue Overview

Content of wysiwyg field is not displayed after moving, if the field is dropped at the same place as before moving it.

Steps to Reproduce (for bugs)

  1. Add the following code to functions.php:
    add_filter('rwmb_meta_boxes', 'meta_box_group_demo_register');
    function meta_box_group_demo_register($meta_boxes)
    {
    $meta_boxes[] = array(
        'title'  => 'Demo group',
        'fields' => array(
            array(
                'id'     => 'standard',
                'type'   => 'group',
                'clone'  => true,
                'sort_clone' => true,
                'fields' => array(
                    array(
                        'name' => 'Demo field',
                        'id' => 'demo-field',
                        'type' => 'wysiwyg',
                        'options' => array(
                            'textarea_rows' => 4,
                        ),
                    )
                ),
            ),
        ),
    );
    return $meta_boxes;
    }
  2. Create a post.
  3. Add content to demo field.
  4. Click 'Add more'
  5. Add content to second demo field.
  6. Pick up the first demo field.
  7. Drop the field at the same spot as where it was picked up.

Expected Behavior

Expect to the content to display, as before moving it.

Current Behavior

The content of the field is not displayed. Selecting the field content reveals that the content is actually still there. Possible workaround: first clicking the "text" button and then clicking the "visual" button solves the problem.

Possible Solution

Screenshots / Video

demo-wysiwyg-sort-clone

Additional information:

Longkt commented 4 years ago

Hi @SimonvanWijhe

Thank you for pointing this out. You can use this CSS code in the admin area to fix this issue temporarily.

body .rwmb-field .tmce-active .wp-editor-area { color: #000; }

Regards.

SimonvanWijhe commented 4 years ago

Hi @Longkt,

Thanks for your reaction. Unfortunately this doesn't really solve the problem.

The content is now shown (with the extra line of css). But still the html tags are shown. See recording.

demo-wysiwyg-sort-clone-with-css

For the html tags to disappear I would still have to click the "text" button followed by "visual".

Any ideas on when the issue will be fixed?

Best, Simon

SimonvanWijhe commented 4 years ago

Related Issue: https://github.com/wpmetabox/meta-box/issues/1381

rilwis commented 1 year ago

We no longer see this bug. It's probably fixed in recent commits.

If you still see this bug, feel free to re-open or create a new issue.