Visual-Tab for WYSIWYG-Editor empty on initial load when using firefox.

Support MB Custom Post Type Visual-Tab for WYSIWYG-Editor empty on initial load when using firefox.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #50086
    dotsuniteddotsunited
    Participant

    Hello,
    we are using the WYSIWYG field in our custom sidebar. It's a clonable group which has the wysiwyg field.
    On initial load to edit a page we often see that a blank visual tab. This seems to only happen when using firefox and on the initial loading. Any followup loading of the page works. The code tab never has this issue. I fear this has to do with this wp-core ticket (https://core.trac.wordpress.org/ticket/62450) but I still wanted to ask, in case you know some sort of workaround. I looked through the forum, yet I did not find any issue that fits exactly to the my situation / setup.

    What I've tried so far.
    - Disable all other plugins to check for conflicts
    - Update WP to 7.0 and Metabox to 5.12.1 and MB-Block to 1.8.4.
    - Tried it out with the classic editor plugin, here this issue does not occur.
    - Tried on multiple browsers, only occurs on firefox
    - Happens locally, on staging, on production.
    - The window.tinymce / tinymce object usually exists when the visual tab is blank.
    - The whole <body> of the editor is empty, the text is not just white on white.

    So it appears that there is some sort of timing conflict with gutenberg and tinymce. I could not find any relevant information looking at the dev tools.

    This is my current sidebar setup:

    
    new RW_Meta_Box( array(
    	'id'       => 'sidebar',
    	'title'    => __( 'Sidebar', 'mvz' ),
    	'pages'    => array( 'page' ),
    	'context'  => 'normal',
    	'priority' => 'high',
    	'fields'   => array(
    		array(
    			'name' => esc_html__( 'Kontaktbox anzeigen:', 'mvz' ),
    			'id'               => "sidebar_default",
    			'type' => 'checkbox',
    			'std'  => 1,
    		),
    		array(
    			'name'   => esc_html__( 'Sidebar Box', 'mvz' ),
    			'id'     => 'sidebar_boxes',
    			'type'   => 'group',
    			'clone'  => true,
    			// List of sub-fields
    			'fields' => array(
    				array(
    					'type' => 'text',
    					'name' => esc_html__( 'Headline:', 'mvz' ),
    					'id'               => "sidebar_headline",
    				),
    				array(
    					'name'             => esc_html__( 'Image Upload', 'mvz' ),
    					'id'               => "sidebar_image",
    					'type'             => 'image_advanced',
    					'max_file_uploads' => 1,
    				),
    				array(
    					'name' => esc_html__( 'Text', 'mvz' ),
    					'id'   => "sidebar_text",
    					'type' => 'wysiwyg',
    					'raw' => false,
    					'options' => array(
    						'textarea_rows' => 4,
    						'teeny'         => false,
    						'media_buttons' => false,
    					),
    				),
    
    			),
    		)
    	)
    ) );
    

    Any ideas to fix this for our situation are very much appreciated.

    Thank you an advance.

    #50087
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    Using the class RW_Meta_Box to register the custom fields is the old way. Can you please try using the filter hook rwmb_meta_boxes and recheck the issue? Following the documentation https://docs.metabox.io/creating-fields-with-code/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.