Mermaidjs side-by-side editing jittery

Bug report

I am using mermaid with multiple sequence diagrams in the same file.
After a recent update it still functionally renders, but when I edit a diagram both the input window and preview window jumps around to the top, making the writing experience terrible. If I close the side-by-side window, everything works as normal.

The debug log says “MERMAID: render error null”, but the actual diagrams seem to be rendered just fine.

Info

  • Platform: Windows
  • Platform version: 10
  • App Version: 4.3.2

Reproduce

Install the mermaidjs inkdrop plugin
Create a new note
Use a large (or multiple) mermaid sequenceDiagram
Toggle side-by-side window
Start editing

Hi warcode,

Thank you for reporting it.
I found that it is because diagrams are being unmounted on every rendering process.
This is caused by a change recently made for showing rendering error.
I’ll fix it in the next version.

1 Like

Hi @warcode,

I built a patch for this issue so can you please try it?

https://inkdrop-dist.s3-ap-northeast-1.amazonaws.com/tmp/Inkdrop-4.3.2-Windows-patch-3.zip

Thanks!

That seems to be working correctly.

Thank you for fixing it.

1 Like

great!

v4.3.3 is out. Thanks again for the report!