[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
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 16.6k
- Fork
- 993
- Merge medio
- 20h 1m
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di udecode/plate
-
triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
mobile triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Beta]: The docs Demo example page starts with an empty editorForse già presa @natamox l’ha presa oggi. Apertatriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
udecode/plate#5308 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di udecode/plate
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
ajv-validator/ajv#2689 ·
-
[Bug]: IME confirmation Enter can submit the SSH port-forward dialogForse già presa @seijikohara l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
home-assistant/frontend#55323 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
lingdojo/kana-dojo#33188 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
self-driving
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno