[Beta]: In the Yjs Collaboration example, ⌘C or ⌘V on a whole selected line empties the line in all four peers, and nothing is copied or pasted
Los mantenedores suelen responder en 1 día
@zbeyens ya está trabajando en esto.
Desde el 27/10/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
Línea de trabajo
Start with the key handler in apps/www/src/app/(app)/examples/plite/_examples/yjs-collaboration.tsx, especially onKeyDown and the handleDeleteKeyDown whole-line branch around the cited lines. Trace how keydown events and selected text reach replaceBlockTextWithEmpty; compare the behavior with the collaboration demo, which the issue reports works correctly. Reproduce whole-line copy, arrow-key, and paste cases across peers; done when copy preserves the line and paste replaces the selection as expected.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
NOT_ENOUGH_INFO
Summary
On /examples/plite/yjs-collaboration, selecting a whole line in a peer's editor and pressing ⌘C empties that line in all four peers, and nothing is written to the clipboard. The line is already empty while ⌘ is held, before C is pressed. Other keys do the same: → with the whole line selected also empties it. In natamox's hand retest in Chrome on 2026-10-24, ⌘V over a whole selected line also leaves an empty line, and the pasted text does not appear.
Reproduction
The page shows four peers, Peer A to Peer D, each with its own editor. All four start with Hello world!.
Repro 1: /examples/plite/yjs-collaboration, Chromium
An agent ran this with Playwright.
- Open https://beta.platejs.org/examples/plite/yjs-collaboration.
- In Peer A's editor, click the end of
Hello world!, press Enter and typeQA copy line. The new line appears in all four peers. - For comparison, press ⌥⇧← twice to select
copy line, then press ⌘C. The clipboard now holdscopy line, and the line stays. - Click the end of
QA copy lineand press ⌘⇧← to select the whole line. - Press and hold ⌘.
- Press C, then release both keys.
In step 5 the line becomes an empty line in all four peers. After step 6 the clipboard still holds copy line from step 3. Playwright WebKit gives the same result. In another run, pressing → in place of steps 5 and 6 also emptied the line in all four peers, in both engines.
Repro 2: /examples/plite/yjs-collaboration, Safari
An agent drove desktop Safari on macOS on 2026-10-20 (PT). The session's report shows the keys were sent by a script with fixed waits, and the page text was read through the macOS accessibility tree.
- In Peer A, on a new last line
QA alpha beta, press ⌘→, then ⌘⇧← to select the line. - Press ⌘C and wait 0.3 seconds.
- Press →, Return, wait 0.15 seconds, and press ⌘V.
After step 2, QA alpha beta is gone from all four peers. After step 3, one QA alpha beta comes back on a new line. Later in the session, the same steps on the line QA alpha beta你好 emptied it again, and the paste gave the older QA alpha beta without 你好.
Repro 3: paste over a whole line, Chrome, by hand
natamox ran this by hand in desktop Chrome on 2026-10-24 (PT).
- Open https://beta.platejs.org/examples/plite/yjs-collaboration.
- In Peer A, double-click
worldinHello world!and press ⌘C. The line stays. - Click the end of
Hello world!, press Enter and typeQA paste line. - Press ⌘⇧← to select the whole line.
- Press ⌘V.
The line is left empty, and world does not appear.
Expected
⌘C copies the selection and leaves the document as it is, and ⌘V replaces the selected line with the clipboard text. The same editor already does this for part of a line: in step 3 of Repro 1, ⌘C on copy line copies it and the line stays. The Collaboration Demo on the same Beta does it for a whole line: in the 2026-10-24 replay, selecting Ada's whole line on /examples/plite/collaboration-demo and pressing ⌘C put the full line on the clipboard, and both editors kept it, in Chromium and in Playwright WebKit.
Actual
- With a whole line selected, pressing ⌘ empties the line in all four peers before C is pressed.
- ⌘C then writes nothing new to the clipboard.
- → and other keys pressed with the whole line selected empty it the same way.
- The emptied line stays as an empty line in every peer.
- In natamox's hand retest in Chrome on 2026-10-24 (Repro 3), ⌘V over a whole selected line leaves the line empty, and the pasted text does not appear.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO. The page names no build. Repro 2's report does not name one either. - 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. In Chromium the readout reads the clipboard through the page's clipboard API. In both engines a paste into a plain text field outside the editors confirmed what the clipboard held.
- Repro 2: an agent in desktop Safari on macOS, 2026-10-20 (PT). The Safari version was not recorded.
- An agent also reproduced it on 2026-10-20 (PT) in a desktop Chrome 155 window, on Beta
7f98d46ed5as that run's notes name it. After ⌘C on the whole lineQA copy line, the line emptied in all four peers, and a paste gave the earlier clipboard textclipboard-reset. - natamox retested by hand on 2026-10-22 (PT) and recorded that neither copy nor paste worked. The browser was not recorded.
- Repro 3: natamox by hand in desktop Chrome on 2026-10-24 (PT). The Chrome version was not recorded.
- Firefox was not tried. Nobody has tried a phone.
Caveat
- From a reading of the example's code on
next, not checked with a debugger: the editor'sonKeyDown(apps/www/src/app/(app)/examples/plite/_examples/yjs-collaboration.tsx:1769) callshandleDeleteKeyDown(:964, through:1233) for every key. Only the whole-document branch checks for Backspace or Delete (:908). When the page selection's text equals one block's text (:952to:962), the whole-line branch callspreventDefault(:988) and replaces that block's text with an empty text (:990,replaceBlockTextWithEmptyat:873). The branch for a selected paragraph node (:971to:980) does not check the key either. This fits the replay, where the keydown of ⌘ itself was the first prevented key and emptied the line, and C then met an empty selection. If so, this is the example's own key handler, not Plite core. - /examples/plite/yjs-hocuspocus has the same handler (
yjs-hocuspocus.tsx:782, the clearing call at:807, called from:1042). That page was not tested: on the public Beta its four peers cannot reach the server it connects to by default (ws://localhost:4444/yjs,:90). - The headless replay on 2026-10-24 did not reproduce the paste part. There, the keydown of ⌘ emptied the selected line first, and the paste then landed in the empty line, so the line ended up holding the pasted text in all four peers: plain text in Chromium and WebKit, and HTML
<p>A</p><p>B</p>in WebKit. natamox's hand retests on 2026-10-22 (browser not recorded) and in Chrome on 2026-10-24 both ended with an empty line. Why the two differ is not known. Later in the Safari session of Repro 2, an HTML paste of<p>A</p><p>B</p>after ⌘⇧← on the line also left the line gone, with neitherAnorBshowing, but its report could not confirm what was selected. - What Safari's ⌘C wrote is unclear. In Repro 2 the paste after the first ⌘C gave
QA alpha beta, and the report did not read the clipboard.
Evidence
- Repro 1: headless Chromium recording, 28.2 seconds, with an English step panel beside the page. A dark readout box at the bottom left, drawn by the test script, shows the keys held, the selected text, the clipboard as the script reads it, and line 2 of each peer. At 0:02.3 the click lands at the end of
Hello world!, and by 0:04 all four peers showQA copy line. From 0:06.3 the control selectscopy line, and by 0:07.8 the clipboard readscopy line. At 0:09.9 the click lands at the end of the line, and by 0:10.6 the selected text isQA copy line. At 0:13.0 ⌘ goes down, and line 2 of all four peers becomes empty. At 0:15.5 C is pressed, and the clipboard still readscopy line. The result shows from 0:19.2 to the end. - Repro 2: a 16-second excerpt of the Safari session's recording. Safari's toolbar is cropped out. The caption band at the top comes from the original recording and also names later steps that this excerpt leaves out. At 0:02
QA alpha betais highlighted in Peer A. At 0:07.8, after ⌘C, the line disappears from Peer A and Peer B. At 0:13.3, after →, Return and ⌘V, the view scrolls, and Peer A showsQA alpha betaon a new line below an empty one.
Repro 1 — headless Chromium, /examples/plite/yjs-collaboration
https://github.com/user-attachments/assets/9e3a0233-6be0-49ea-a776-8b9ecc30c116
Repro 2 — Safari, /examples/plite/yjs-collaboration
https://github.com/user-attachments/assets/9a928b4b-d160-4300-9123-dbc7aa40f04c
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.6k
- Forks
- 993
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 61
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de udecode/plate
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the linkPosiblemente ocupada @zbeyens la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
udecode/plate#5314 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Beta]: The docs Demo example page starts with an empty editorPosiblemente ocupada @natamox la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
udecode/plate#5308 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de udecode/plate
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vekexasia/pi-extensible-workflows#374 ·
Los mantenedores suelen responder en 2 días
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
help wanted linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
GiuseppeBellamacina/downtime#19 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
scaleway/ultraviolet#7089 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Get-Concord-AI/concord-mcp#296 ·
Los mantenedores suelen responder en 1 día