I’m trying to re-use my NodeViews when possible and have implemented a logic based on getPos and attributes to decied if a NodeView can be reused or not.
However, it seems that getPos for existing NodeView still returns the old position when a new node that is rendered using NodeView is inserted. I made an example for this: https://glitch.com/~confused-target-0s26ymqxiu
If you press the “Add custom node at start” button to insert a NodeView-node at the start of the document where there currently already is one, getPos for both the old and the new NodeView return 0. I would expect getPos for the old NodeView to return 1, since it was moved down. This is the case if you let the callstack finish.
Is this intended behaviour? I wasn’t sure so I wanted to ask here first before reporting it as a bug.