Remove blinking cursor inside the widget with CM instance

I am trying to implement replacement widgets with instances of CM editors inside to draw fractions, matrixes and tables

Screenshot 2023-04-13 at 21.10.09

It kinda works, but I can’t get rid of blinking cursors inside and make a proper cursor movement from the parent editor into the child editor.

Classical case of leaky CSS rules (the inner editors see a .cm-focused element in their ancestor nodes, and thus apply the styles that should only apply if they are focused).

This patch should help, but unfortunately also means themes have to be updated to match the rule specificity.

1 Like

It works perfectly. I can’t imagine how I would make such complicated projects without CM6. Thanks! Great