WYSWYG sidebar bug

Support MB Blocks WYSWYG sidebar bugResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27477
    JackkyJackky
    Participant

    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 );
    }
    
    #27524
    Long NguyenLong Nguyen
    Moderator

    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.

    #27558
    Anh TranAnh Tran
    Keymaster

    Hi Jackky,

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

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