v6.39.3 Can't navigate through block widget with side = 1 ( + another language issue)

Good day!

I encountered what looks like a bug. When block widget side is set to 1, inputs are send to the immediate preceding visible position before the widget even though cursors drawn with RectangleMarker show what seems to be the correct position before the input. Native cursor however is stuck at where the input ends up showing. Sample + other weird behaviors here. Though perhaps an incorrect usage of block widgets is what’s causing this. Setting side to zero doesn’t cause any issue.

A separate minor edge case (sorry I’m putting it here, I didn’t want to create two posts one after the other) is on commenting on the last line of a code fence if the line is empty. The editor will produce markdown comment tokens instead of the indicated language. Sample here.

Thank you very much for your work on codemirror, the block wrappers simplify a lot of block-based styling!

The first issue should be solved 6.39.4. The second is more complicated, and I’ll look into it later.

(For unrelated issues, it really is preferable to create separate posts or, even better, github issues. Putting different things into a single thread just makes them harder to track.)

1 Like

This was a mess to fix, but if you upgrade @codemirror/language, @lezer/common, and @lezer/markdown in your setup (or, probably easier, clear your package lock and reinstall), this should now work better.

1 Like

I was getting some errors but it’s probably just some dependency issues on my end so I’ll work on that, but I got to try it on the website. Thank you very much for your work!