Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/lexical-y-undo-run-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@lexical/y': patch
---

[fix] Stop a format, comment or link from spreading to the end of the document in `@lexical/y` when a collaborator edits inside it while it is undone or its end is deleted

Verify: undo a format, a comment or a link, or delete the text at its end, while a collaborator types, pastes or changes a format inside it; on every client, no text past it gets the value.
14 changes: 9 additions & 5 deletions packages/lexical-website/docs/collaboration/y.md
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,15 @@ not merge as a user might expect:
Undoing a format change does not undo a collaborator's later change of
part of its range, nor the value that change restored after itself: color
`abc`, let a collaborator recolor `b`, then undo the color, and `c` keeps
the old color. Where a collaborator overwrote a step of yours entirely,
the undo manager skips that step as changing nothing, and the same undo
also reverts your step before it. When you undo a format change while a
collaborator removes that format and undoes the removal, the text keeps
the format: the collaborator's undo brings it back.
the old color, up to the end of the range (the same holds for text a
collaborator types or pastes inside the range as you undo). Undoing a link
while a collaborator formats text inside it keeps the link on its text:
formatting text in a link also sets the link's text format, which writes
the link there again. Where a collaborator overwrote a step of yours
entirely, the undo manager skips that step as changing nothing, and the
same undo also reverts your step before it. When you undo a format change
while a collaborator removes that format and undoes the removal, the text
keeps the format: the collaborator's undo brings it back.
- **Large lists.** A structural edit in a list costs time proportional to
the list on every client.
- **The caret when a collaborator rewrites its line.** A caret stays after
Expand Down
Loading
Loading