[Beta]: In the Plite hidden content blocks example, newly typed text in the first line disappears when a block opens or closes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 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 packages/plitejs/src/react/components/editable-text-flow.tsx, especially the reconcile(false) layout effect and the saved entries described in the issue; then inspect the hidden blocks example at apps/www/src/app/(app)/examples/plite/_examples/hidden-content-blocks.tsx. Reproduce by typing at the end of the first line and expanding Accordion body in Chromium or WebKit. Done means the text stays visible and clicking at the end places the caret after it; the issue names no test file.
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 https://beta.platejs.org/examples/plite/hidden-content-blocks, text typed at the end of the first line disappears from the page as soon as any block expands or collapses, or the Details tab changes. The model still holds the text. A click on the line brings it back, but the caret lands before it, so the next keystroke goes in the middle.
Reproduction
Repro 1: type, then open and close blocks, Chromium
An agent ran this on the live Beta in headless Chromium 149 (Playwright) on 2026-10-22 (PT) and recorded it.
- Open https://beta.platejs.org/examples/plite/hidden-content-blocks. Click the end of the first line,
Intro visible before hidden blocks., and type111111. - Click
Accordion bodyto expand it. - Click
Accordion bodyagain to collapse it. - Click the
Detailstab, thenOverview. - Click the end of the first line on the page.
- Type
X.
Results:
- Steps 2 to 4: the page shows
Intro visible before hidden blocks., while the model holdsIntro visible before hidden blocks.111111. Waiting 1.5 s does not bring the text back. - Step 5:
111111shows again, but the model caret is at offset 35, the end of the old text, before111111. - Step 6: the line becomes
Intro visible before hidden blocks.X111111.
Clicking only Collapsible note, only switching the Details tab, or using the toolbar's Accordion button gives the same result. WebKit 26.5 (Playwright) gives the same result too.
The find comes from natamox's own screen recording, and natamox confirmed it by hand on 2026-10-22 (PT). The browser of that recording was not noted.
Repro 2: replay
An agent replayed steps 1 and 2 on the live Beta in headless Chromium 149 and WebKit 26.5 on 2026-10-24. In both engines the first line read Intro visible before hidden blocks.111111 after typing and Intro visible before hidden blocks. after the Accordion opened.
Expected
The first line keeps showing 111111 while other blocks open and close, and a click at the end of the line puts the caret after 111111.
Actual
As listed under Results. The page shows stale text, and the next edit lands in the middle of the line.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO. The page does not show its build. - Repro 1: Chromium 149.0.7827.55 and WebKit 26.5 (Playwright, headless) on macOS, 2026-10-22 (PT).
- Repro 2: the same engines, 2026-10-24.
- Not tried in Safari itself or on a phone. Firefox does not launch headless on this machine.
Caveat
From a reading of the code on next a32ed63c78:
- The example's
Element(apps/www/src/app/(app)/examples/plite/_examples/hidden-content-blocks.tsx:473) reads every block's open state fromReact.useContext(HiddenBlocksContext)(:483). A state change re-renders every block, the first paragraph included. - Plite writes the text itself through
EditableTextFlowinpackages/plitejs/src/react/components/editable-text-flow.tsx. After that re-render, its layout effect callsreconcile(false)(:1913), which paints from the text saved at the last React render (entriesRef,:1767). Only the default,reconcile(true)(:1784), reads the live model. Native typing does not re-render the line, so the saved text is still the old text. - A probe saw the same text container element throughout, so the line was not remounted.
- So the bug may sit in Plite's React layer. Any element that re-renders for an outside reason after native typing could paint old text. This was not checked on other pages or tried as a code change.
Evidence
- Repro 1: the agent's recording, 0:33, real time, with the step panel on the right. The dark box at the bottom left is drawn by the test script. It prints the model's first line and the page's first line, and turns red when they differ.
Repro 1 — Chromium 149, /examples/plite/hidden-content-blocks
https://github.com/user-attachments/assets/7fa0ce85-8c3a-4c34-8258-733323a570dd
Related
- #5269 covers undo doing nothing in this example, among 16. Its cause differs.
- Lingua principale
- TypeScript
- Stelle
- 16.6k
- Fork
- 993
- Merge medio
- 20h 1m
- PR unite (30g)
- 61
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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the linkForse già presa @zbeyens l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
udecode/plate#5314 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
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 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
udecode/plate#5308 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
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
-
[Integration]: eRPCAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ava-labs/builders-hub#4826 ·
I maintainer di solito rispondono entro 1 giorno
-
记忆分析的默认模型显示与实际使用不一致Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
anomalyco/opencode#59886 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
a10y a10y-audit ai-driven-qa claude
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno