My app has a line with text where I can add text inputs (they are wrapped in webcomponents and set as “atom” Nodes, unselectable and “isolating”.
They work as expected except if there is no content right after the node, in this case the text inputs get removed upon pressing backspace while writing inside it. If there is some text right after the node it does not happen.
I was investigating a bit and notice that that if “editorView.state.selection.from” matches the index right after my text input node it gets removed upon pressing backspace, if it is another value (because I entered text after adding the node, or clicked somewhere else before focusing on the text input field) it doesn’t get removed and the backspace seems to be completely ignored (I would expect it to remove whatever is at selection index).
Are there any settings that I am supposed to use in this case? Or should I write some code to handle transactions differently whenever the text input webcomponent has focus?
I was expecting ProseMirror to ignore any inputs while the focus is on my component, and it seems to be the case. Apparently the only exception is if the selection points to the index right after the component and I press backspace, which removes the node holding my component. I’m not using ProseMirror inside my component, it’s an implementation of Google Material text input.