Custom Fields
Support MB Blocks WYSWYG sidebar bug

  • Creator
  • #27477
    Resolved Jackky

    While block is registered with 'context' => 'side', if you focus to block once - tinymce will work properly, but if you select another block (or just unfocus this) and then focus it back - tinymce will break. I have find out, how to fix it, this issue comes from the base plugin, from file 'meta-box\js\wysiwyg.js' on line 11 - there you are checking only .wp-block class as closest, while side context doesn't have it.
    Working solution:

    var $this = $( this ),
        $wrapper = $this.closest( '.wp-editor-wrap' ),
        id = $this.attr( 'id' ),
        isInBlock = $this.closest( '.wp-block, .components-panel' ).length > 0;
    // Update the ID attribute if the editor is in a new block.
    if ( isInBlock ) {
        id = id + '_' + rwmb.uniqid();
        $this.attr( 'id', id );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #27524
    Long Nguyen

    Hi Jackky,

    Thank you for your feedback.

    I will escalate this issue and your solution to the developer team to fix it in future updates.

    Anh Tran

    Hi Jackky,

    Thanks a lot for your help! I've fixed the issue and will release a new version soon.

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