Caret inside the boundaries of an atomic node's styling


I’ve created a schema for a node which is atomic and styled with a background color and padding (see image below). Everything is working as expected except for the fact that when I position the caret on the left side of the node, it appears on the inside of the padding. If I type a letter in that position it places the letter on the outside as expected, but is there a way to make the caret appear on the outside of the padding instead??

Unfortunately, when it comes to drawing cursors in inline contexts, browsers just do their thing, which is often wrong, but it’s very hard to influence this. Making the element display: inline-block sometimes helps, or, failing that, adding an additional wrapper node containing zero-width spaces around the visibly styled element.

1 Like

I’ll try that out, thank you so much!