Basically, adding gutters causes the selection, when moved at the start of block with arrow up, to not go directly upwards but to the right end of the upper block node. If I remove the left gutter it’s fixed but moving downwards from the end of block misbehaves. With only right gutter the arrow moving works, just that sometimes the caret flickers into the NodeView.
That’s a lot more code than I’m willing to read, and I’m not clear on what you mean by ‘gutter’ here. If you can reduce this to a small, self-contained example I could take a look.
I can’t get the thing you show in the movie to happen in that demo. It might help to provide a textual description of what you’re doing and tell me what browser and platform you’re using.
I can see that happening now. But with this kind of thing, where your custom DOM structure causes the browser’s cursor motion to fall apart, the library does not try to detect and handle every possible such thing (the set of possible DOM structures and corresponding browser mess-ups is infinite, it’d be too much). So you’ll probably want to either change your DOM structure to avoid the bug, or register a custom key handler that detects this situation and moves the selection the way it should move.