filterTransaction before a nodeview

I have created some question widgets using Nodeviews and react.

Typing between the widgets, and then hitting backspace, creates a mess when the cursor goes inside the nodeView. (you can check it here) What I need is to select the outer node when the previous node is of X type.

So looked into filterTransaction and managed to detect when the cursor is moved inside the nodeView and stop the transaction.

Before going any further, is this a valid way of doing something like that or should I look into chaining a new Command inside backspace?

Sometimes styling hacks like making the widget display: inline-block or adding zero-width spaces inside as padding can help avoid these kinds of issues.

If that doesn’t work, I’d lean more towards a custom backspace handler than an appendTransaction hook, if only because that way it’s not running all the time.