I have a NodeView that uses an inner PM instance to manage its content. The innerView dispatches transactions to update the outerView’s document and selection. Similar to the Footnote example.
My issue is that when the innerView sets the outerView’s selection, the outerView immediately resets its selection to the first position within the NodeView.
It looks like from a trace() that when the outerView updates, it sees a selection change and fires
readDOMChange and syncs its selection to the DOM. Since the NodeView is opaque to it, it sets selection to the first position in the NodeView. This happens even when the outerView is not focused.
For the NodeView,
ignoreMutation are both set to true, and the
mousedown event on the innerView is set to make sure focus is on the innerView rather than the outerView.
I thought this was working correctly ~ 6 months ago. Any idea what I am doing wrong? Is it possible to suppress the outerView from updating the selection?