Is this expected? I’m not quite sure why it would happen.
With the irrelevant portions of our code left out, it looks like this. Is there any way we can avoid this besides having to move to appendTransaction
? And would that even work to avoid this? I’m not sure why it occurs in the first place and I’d like to understand before taking a stab at fixing it again.
handleTextInput(view, from, to, text) {
// ... setup code
tr.insertText(text, from, to);
tr.addMark(
posBeforeLink,
from + text.length,
linkMarkType.create(newAttrs)
);
// @TODO -- Our approach causes a closeHistory-like behavior where all updates trigger a new history checkpoint.
dispatch(tr);
}