# Pressing backspace introducing odd ReplaceStep

**URL:** <https://discuss.prosemirror.net/t/pressing-backspace-introducing-odd-replacestep/6544>\
**Category:** Uncategorized\
**Created:** [July 2, 2024, 1:14pm UTC](https://discuss.prosemirror.net/t/pressing-backspace-introducing-odd-replacestep/6544 "2024-07-02T13:14:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![seleckis](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/seleckis/32/3866_2.png) [@seleckis](https://discuss.prosemirror.net/u/seleckis)\
**Post date:** [November 14, 2024, 8:19am UTC](https://discuss.prosemirror.net/t/pressing-backspace-introducing-odd-replacestep/6544/8 "2024-11-14T08:19:23Z")

</div>

I have the same issue: [Transaction steps work very strange](https://discuss.prosemirror.net/t/transaction-steps-work-very-strange/6257) Unfortunately can’t figure out how to deal with this.

For example, there is a content **`Some text<span> some mark</span>`**. Where span is any custom Mark. Removing the “t” to the left of the space that comes first inside the span will call step containing the text inside the Mark, but without the Mark and insert it again. It turns out that this Mark simply disappears.

Comparing changes with

```ts
  let changes = ChangeSet.create(oldState.doc);
  changes = changes.addSteps(tr.doc, tr.mapping.maps, undefined);

```

gives only deleted “t” and does not have information about reinserted marked text.

---

_[View the full topic](https://discuss.prosemirror.net/t/pressing-backspace-introducing-odd-replacestep/6544)._
