I’m trying to debug some behaviour around tables. If the cursor is positioned after a table, and the user enters a space character, a new paragraph is inserted but then rapidly deleted, and the cursor is ‘sucked back in’ to the table. If the user enters a newline, the cursor is sucked back into the table immediately.
If the user enters any other character, that character is inserted into a new paragraph below the table. This is the behaviour I’d like for spaces and newlines as well.
I’ve tried disabling all my input rules and key bindings and the behaviour remains the same, so I am not sure exactly where to look to figure this out.
Video of the behaviour: https://www.youtube.com/watch?v=ec22Y6PioUs
What does having the cursor positioned after a table look like? Is there content after the table that the cursor is in? ProseMirror doesn’t support putting the cursor outside of block nodes.
A cursor after a table grows to the full height of the table, and blinks:
As far as I can tell, there is no content after the table.
(And, somehow, when a non-whitespace character is entered in this position, a new paragraph is created under the table.)
* a related issue would be how to ‘exit’ out of other kinds of blocks which occur at the end of a document. In the basic example, if there is a blockquote or code block at the end of the doc, it doesn’t seem possible to create a new block below it. If there is a horizontal rule at the end of a doc, it can be selected, but nothing can be inserted after it.