Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Beta]: In the Collaboration Demo, Enter at the edge of a bold word throws "Editor point does not target a text group." and the two editors diverge

Aperta
#5,278 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@zbeyens ci sta già lavorando.

Dal 27/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
backend, frontend

Direzione di ricerca

Start with packages/plitejs/src/yjs/core/selection.ts and trace pointToYjsRelativePosition through packages/plitejs/src/yjs/core/controller.ts at the cursor publish and drift check. Then inspect packages/plitejs/src/yjs/core/canonical-split.ts, especially findCanonicalSplit, and reproduce in /examples/plite/collaboration-demo. Done means Enter at either edge of a bold word splits both editors identically, remote edits stay in sync, and no import or retry error occurs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug plugin:yjs target:beta

Testing lane

  • Repository: udecode/plate
  • Branch: next
  • Release channel: Beta
  • Exact commit/package version: NOT_ENOUGH_INFO

Summary

On /examples/plite/collaboration-demo, pressing Enter with the caret at the end or the start of a bold word throws Editor plugin commit-listener failed in plugin "yjs": Editor point does not target a text group. Ada's editor splits the line, but Lin's does not. After that the two editors do not match again. The next remote edit makes Ada's card show Collaboration import failed, Ada shows part of the line twice, and the card's Retry button does not bring the editors back together.

Reproduction

The page shows two editors, Ada and Lin, each with its own Y.Doc. Both start with the line Ada and Lin edit independent documents through a local Yjs room.

Repro 1: /examples/plite/collaboration-demo, Chromium

An agent ran this with Playwright.

  1. Open https://beta.platejs.org/examples/plite/collaboration-demo.
  2. In the Ada editor, double-click the word Lin.
  3. Press ⌘B. Lin turns bold in both editors.
  4. Press →. The caret is at the end of the bold Lin.
  5. Press Enter.
  6. In the Lin editor, click at the start of the line and type U.
  7. Click Retry in Ada's card.

Step 5 throws the error. Ada's editor shows two paragraphs, Ada and Lin and edit independent documents through a local Yjs room. Lin's editor keeps the line whole and gets an empty paragraph after it. Both cards still read Synced and Ready, and the page shows no message.

After step 6, Ada's card shows Collaboration import failed above Editor point does not target a text group. and a Retry button, and its Ready badge reads error. Ada's first paragraph now reads UAda and Lin edit independent documents through a local Yjs room., so edit independent documents through a local Yjs room. shows twice in Ada and once in Lin. Ada's Undo count drops from 2 to 1.

Step 7 throws Editor point does not target a text group. again, and nothing on the page changes.

With ← instead of → in step 4, the caret is at the start of the bold Lin. Step 5 then throws the same error, Ada splits the line before Lin, and Lin does not split it.

Expected

The same page splits a line in both editors, with no error, when Enter is pressed inside plain text or inside the bold word. In the 2026-10-24 replay, Enter between ed and it of edit, and Enter between L and in of the bold Lin, each gave the same two paragraphs in Ada and Lin. A letter typed in Lin afterwards stayed in sync. Enter at the edge of the bold word should behave the same way.

Actual

  • Enter at either edge of a bold word throws Editor plugin commit-listener failed in plugin "yjs": Editor point does not target a text group.
  • Ada and Lin then show different documents, while both cards still read Synced.
  • The next remote edit fails to import into Ada, and Ada shows duplicated text.
  • Retry does not recover. In Chromium it throws again and the error card stays. In Playwright WebKit it throws nothing, removes the error card and sets the badge back to Ready, but Ada still shows the duplicated paragraph, and Lin still shows one line plus an empty paragraph.
  • In the 2026-10-22 run, only a page reload brought the editors back together.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page names no build. The 2026-10-22 runs used Beta built from next 7f2eacb6eb, deployed that day.
  • Repro 1 and its recording: an agent on 2026-10-24, at natamox's request, in headless Chromium 149.0.7827.55 on macOS, driven by Playwright with real mouse and key input. The same steps in Playwright WebKit 26.5 (not Safari) also fail, as Actual describes.
  • An agent first found this on 2026-10-22 (PT), at natamox's request, in the Claude desktop app's built-in Chromium 152, and recorded it in headless Chromium 149 the same day, with the same result.
  • Firefox was not tried: Playwright's Firefox did not launch headless on the agent's Mac. Nobody has tried Safari itself or a phone.

Caveat

  • From a reading of the code on next, not checked with a debugger: the message comes from pointToYjsRelativePosition (packages/plitejs/src/yjs/core/selection.ts:13, thrown at :19) when a point has no text in the Yjs tree. After a local commit, the controller publishes the mapped cursor (packages/plitejs/src/yjs/core/controller.ts:922, which converts it in awareness.ts:23) and then checks whether the editor and Yjs drifted apart, converting the selection again at controller.ts:939. Both steps make this conversion.
  • An inference from the result, not confirmed in the code: Lin's view, with no split and an empty paragraph at the end, would be what the split wrote into Yjs. So a split at the boundary between two text runs writes something different from the editor's own split. The conversion then throws, the drift repair queued at controller.ts:953 never runs, and Ada's editor and Ada's Y.Doc stay apart. The likely place is the split write in packages/plitejs/src/yjs/core/canonical-split.ts (findCanonicalSplit, :215). The exact branch is not confirmed.

Evidence

  • Repro 1: headless Chromium recording, 28.6 seconds, with an English step panel beside the page. A dark readout box drawn by the test script shows the count of uncaught page errors, each editor's badges and its paragraphs. A red box near the top, also drawn by the script, shows the last uncaught error. At 0:02 the double-click selects Lin in Ada. At 0:05 ⌘B makes it bold in both editors. At 0:07.6 → puts the caret after the bold Lin. At 0:10.3 Enter throws the first error, Ada splits the line, and the readout shows Lin with the whole line plus an empty paragraph. At 0:13.4, after U is typed in Lin, Ada's card shows Collaboration import failed, the readout shows Ada's badge as error, and Ada's first paragraph becomes the whole line. At 0:16.1 Retry throws a second error, and nothing else changes. The result shows from 0:19.5 to the end.
Repro 1 — headless Chromium, /examples/plite/collaboration-demo

https://github.com/user-attachments/assets/745d4f97-cb1c-4c50-b4a7-33709d897c33

Related

  • #5283: in the same example, a remote edit before the local caret leaves the caret at its old offset, so the next letter lands in the wrong place.
  • #5279: in the same example, an offline replace loses the letters the new word shares with the deleted word after reconnect.
Lingua principale
TypeScript
Stelle
16.6k
Fork
993
Merge medio
20h 21m
PR unite (30g)
60

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di udecode/plate

Tutte le issue di udecode/plate

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.