mirror of
https://github.com/yjs/yjs.git
synced 2026-07-09 20:08:51 +02:00
When an attribute change and a delete on the same XmlText are bundled in a single undo stack item, the redone attribute item kept an `origin` pointing at an item under the now-deleted original parent. The encoder then omitted parent info (origin was non-null), and the remote derived parent from origin -- attaching the attribute to the wrong, deleted type. The restored attribute went missing on sync. In redoItem, after determining `left` for parentSub items, drop it if it refers to a different parent than the redo target. This forces the encoder to write parent info directly, so the remote attaches the attribute to the correct (redone) parent.