• First of all, thank you for developing this great plugin! I use it extensively for displaying equations on my website.

    I’ve recently noticed an issue with the Katex Gutenberg block which occurs when the block is placed within a “Group” or “Columns” container with other blocks. When editing the other blocks within the same container (for example a Paragraph), all Katex blocks within that specific container will auto-expand to show both the code and equation once you start typing in any block in the container. This can be distracting since it causes all the text on the page to jump up and down when the Katex blocks expand and minimise. The expected behaviour would be for the Katex blocks to remain minimised until only that specific block has been selected and is in focus.

    This issue only occurs within each specific “Group” or “Columns” container, and does not appear in Katex blocks which are not placed in a container.

    KaTeX version: 2.1.2
    Wordpress version: 5.7.1
    Browsers: Firefox, Chrome

Viewing 1 replies (of 1 total)
  • Thread Starter chillibasket

    (@chillibasket)

    I had a quick look at the source code and there seems to be an easy fix to this issue. In “block-editor.css” I changed:

    .is-selected .wp-block-katex-block-editor .katex-editor,
    .is-typing .wp-block-katex-block-editor .katex-editor  {
        display: block;
    }

    to

    .is-selected > .wp-block-katex-block-editor .katex-editor ,
    .is-typing > .wp-block-katex-block-editor .katex-editor  {
        display: block;
    }

    To make sure that only the “is-selected” and “is-typing” classes for each specific block are used and instead of the ones for the outer container.

Viewing 1 replies (of 1 total)
  • The topic ‘Gutenberg block expanding when editing other blocks in same container’ is closed to new replies.