Apologies if I missed something obvious in the docs or in existing threads but I have a NodeView that contains some complex media controls and when a node of that type is selected and I type a single character the deselectNode() function is called.
The characters are not entered into the document and the node is not removed, so all I need to do is not remove selection on the node when I type, is there something I am missing?
The node in question is an atom, it has the non-editable div and then a series of descendants including a media player/editor. I am attempting to make sure the shortcuts and mousewheel events that the media editor needs are properly passed down to it.
As far as I can tell, PM is always the focused/active dom element so I intended to pass the events down through using the NodeView, but in order to ensure that this instance of the node is the one that should receive these events I was trying to check if the node was selected which, after typing the shortcut, it is not.
If there is a better approach here that I am missing I would gladly pivot.
I believe the reason a key is not wiping out the selected node is because the NodeView has an update() function that returns true. If I set it to false then it behaves as you expect and replaces the node with the typed character.