PM selection anchor pos:
window.getSelection().anchorOffset
window.getSelection().anchorNode

Instructions

  1. Clear contents of Editor
  2. Type a single character (i.e. "a")
  3. (don't click to prevent focus loss)
  4. A transaction is dispatched to tr.replaceWith(1, doc.nodeSize - 2, nodes), where nodes are:
    • An inline node (dinosaur rendered as img)
    • A text node with text of " " (a single space)

Expected (ok for Safari and Firefox)

The cursor is at position 3, after the dinosaur and after the single space

Actual (on Chrome version >= 61.*)

The prosemirror cursor is at position 3, but browser cursor is at position 2

  1. Additionally, try pressing RIGHT ARROW
  2. The browser cursor moves right (to correct position)
  3. A new PM transaction is not applied, because the selection is already valid (?)