Backspace near contenteditable=false nodes on android

Hello,

I have some nodes that are not editable in my content. Placing the cursor right after one and pressing backspace removes content from the left side of the node. However, on all other devices, the actual node is entirely removed when pressing backspace. I noticed the beforeinput handler deals with the case. If no hook stops the actual action of backspace, than here the following code steps into action:

// Crude approximation of backspace behavior when no command handled it

if ($cursor && $cursor.pos > 0) { view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView()); }

The hook cannot catch backspace reliably, I have no means to know if the hook was triggered by the actual keydown and the selection is after the node or it was triggered by beforeinput and the selection is before the node. If this case is actually treated, why not remove the actual node and not the content before it?

Thank you!

No answer on this one?

The hook cannot catch backspace reliably

What do you mean by that? Is it not firing, or is it firing but not having the desired effect? What do you mean by “hook”?