alleyinteractive / wordpress-fieldmanager

Custom field types for WordPress
Other
534 stars 101 forks source link

Sortable rich text areas broken in Firefox #502

Open roborourke opened 8 years ago

roborourke commented 8 years ago

Using the example code below:

<?php
add_action( 'fm_post', function () {

    $field = new \Fieldmanager_RichTextArea( array(
        'name'     => 'sortable_wysiwyg',
        'limit'    => 0,
        'sortable' => true,
    ) );

    $field->add_meta_box( 'Sortable wysiwyg test', 'post' );

    $group = new \Fieldmanager_Group( array(
        'name'     => 'sortable_wysiwyg_group',
        'limit'          => 0,
        'sortable'       => true,
        'children'       => array(
            'text'  => new \Fieldmanager_RichTextArea(),
        ),
    ) );

    $group->add_meta_box( 'Sortable wysiwyg in a group test', 'post' );

} );

The following behaviour is observed in the latest Firefox:

  1. Clicking 'Add field' for the single field results in a broken rich text field
  2. Clicking 'Add group' for the rich text field in a group works, however when reordering the group the text from the rich text area in the group that was moved disappears
mboynes commented 8 years ago

Thanks for the bug report @sanchothefat!

Tested in Chrome 51.0.2704.103 and FF 47.0 on OS X 10.11.5.

dlh01 commented 3 years ago

See #636 for another snippet that seems to exhibit the behavior described in (1), and that a fix can be tested against.

dlh01 commented 3 years ago

No fix forthcoming for 1.4.

matthewmcvickar commented 2 weeks ago

I want to add to this issue that RichTextAreas also become blank and unresponsive if they are part of the Gutenberg post sidebar's 'Post' tab and the post sidebar switches from the 'Post' tab to the 'Block' tab and back to 'Post.' The TinyMCE editor works fine when the editor is first loaded, but if you click in the editor—which changes the sidebar to the 'Block' tab—and then click the 'Post' tab again, any FieldManager TinyMCE editors will be blank and cannot be clicked on, though their 'Text' tab is editable and shows the actual content of the field.