I can’t reproduce that behavior. Which browser does it happen in? Browsers are pretty terrible about drawing the cursor in the right place, but so far adding a <br> to empty textblocks has been a reliable workaround for the cursor-at-the-right bug.
I’m having the same problem on prosemirror-view@1.15.7, when I create a new paragraph, the cursor doesn’t move down, so I moved it using transaction.setSelection and it worked, except for the Cursor that doesn’t update until I type something.
I checked the source code and apparently it only updates when there’s an actual selection (in case of no selection, was the browser supposed to handle the update?), I made these changes and it fixed the problem:
if (updateSel) {
this.domObserver.stop();
var forceSelUpdate = updateDoc && (result.ie || result.chrome) && !this.composing &&
- !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);
+ selectionContextChanged(prev.selection, state.selection);
if (updateDoc) {